summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_rendercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_rendercontext.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_rendercontext.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp
index fc756e7a90..48b87d9f2c 100644
--- a/core/fpdfapi/render/cpdf_rendercontext.cpp
+++ b/core/fpdfapi/render/cpdf_rendercontext.cpp
@@ -65,23 +65,24 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
const CFX_Matrix* pLastMatrix) {
for (auto& layer : m_Layers) {
CFX_RenderDevice::StateRestorer restorer(pDevice);
- CPDF_RenderStatus status;
+ CPDF_RenderStatus status(this, pDevice);
+ if (pOptions)
+ status.SetOptions(*pOptions);
+ status.SetStopObject(pStopObj);
+ status.SetTransparency(layer.m_pObjectHolder->GetTransparency());
if (pLastMatrix) {
CFX_Matrix FinalMatrix = layer.m_Matrix;
FinalMatrix.Concat(*pLastMatrix);
- status.Initialize(this, pDevice, pLastMatrix, pStopObj, nullptr, nullptr,
- pOptions, layer.m_pObjectHolder->GetTransparency(),
- false, nullptr);
+ status.SetDeviceMatrix(*pLastMatrix);
+ status.Initialize(nullptr, nullptr);
status.RenderObjectList(layer.m_pObjectHolder.Get(), &FinalMatrix);
} else {
- status.Initialize(this, pDevice, nullptr, pStopObj, nullptr, nullptr,
- pOptions, layer.m_pObjectHolder->GetTransparency(),
- false, nullptr);
+ status.Initialize(nullptr, nullptr);
status.RenderObjectList(layer.m_pObjectHolder.Get(), &layer.m_Matrix);
}
- if (status.GetRenderOptions()->HasFlag(RENDER_LIMITEDIMAGECACHE)) {
+ if (status.GetRenderOptions().HasFlag(RENDER_LIMITEDIMAGECACHE)) {
m_pPageCache->CacheOptimization(
- status.GetRenderOptions()->GetCacheSizeLimit());
+ status.GetRenderOptions().GetCacheSizeLimit());
}
if (status.IsStopped())
break;