summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp16
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp18
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp2
3 files changed, 18 insertions, 18 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index 5ffedca5ab..3144191469 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -443,7 +443,7 @@ FX_BOOL CPDF_RenderStatus::ProcessForm(const CPDF_FormObject* pFormObj,
m_pDevice->SaveState();
status.RenderObjectList(pFormObj->m_pForm, &matrix);
m_bStopped = status.m_bStopped;
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return TRUE;
}
FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix) {
@@ -583,7 +583,7 @@ void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
const CFX_Matrix* pObj2Device) {
if (ClipPath.IsNull()) {
if (!m_LastClipPath.IsNull()) {
- m_pDevice->RestoreState(TRUE);
+ m_pDevice->RestoreState(true);
m_LastClipPath.SetNull();
}
return;
@@ -592,7 +592,7 @@ void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
return;
m_LastClipPath = ClipPath;
- m_pDevice->RestoreState(TRUE);
+ m_pDevice->RestoreState(true);
int nClipPath = ClipPath.GetPathCount();
for (int i = 0; i < nClipPath; ++i) {
const CFX_PathData* pPathData = ClipPath.GetPath(i);
@@ -974,7 +974,7 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheSize);
}
if (status.m_bStopped) {
- pDevice->RestoreState();
+ pDevice->RestoreState(false);
break;
}
} else {
@@ -986,11 +986,11 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheSize);
}
if (status.m_bStopped) {
- pDevice->RestoreState();
+ pDevice->RestoreState(false);
break;
}
}
- pDevice->RestoreState();
+ pDevice->RestoreState(false);
}
}
@@ -1007,7 +1007,7 @@ CPDF_ProgressiveRenderer::CPDF_ProgressiveRenderer(
CPDF_ProgressiveRenderer::~CPDF_ProgressiveRenderer() {
if (m_pRenderStatus)
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
}
void CPDF_ProgressiveRenderer::Start(IFX_Pause* pPause) {
@@ -1080,7 +1080,7 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) {
}
if (m_pCurrentLayer->m_pObjectHolder->IsParsed()) {
m_pRenderStatus.reset();
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
m_pCurrentLayer = nullptr;
m_LayerIndex++;
if (pPause && pPause->NeedToPauseNow()) {
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index b8fa400db7..393b993e35 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -959,7 +959,7 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
m_pDevice->SaveState();
if (pPageObj->IsPath()) {
if (!SelectClipPath(pPageObj->AsPath(), pObj2Device, bStroke)) {
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return;
}
} else if (pPageObj->IsImage()) {
@@ -969,7 +969,7 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
}
FX_RECT rect;
if (GetObjectClippedRect(pPageObj, pObj2Device, FALSE, rect)) {
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return;
}
CFX_Matrix matrix = *pattern->pattern_to_form();
@@ -978,7 +978,7 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
int alpha = pPageObj->m_GeneralState.GetAlpha(bStroke);
DrawShading(pattern, &matrix, rect, alpha,
m_Options.m_ColorMode == RENDER_COLOR_ALPHA);
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
}
void CPDF_RenderStatus::ProcessShading(const CPDF_ShadingObject* pShadingObj,
@@ -1006,7 +1006,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
m_pDevice->SaveState();
if (pPageObj->IsPath()) {
if (!SelectClipPath(pPageObj->AsPath(), pObj2Device, bStroke)) {
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return;
}
} else if (pPageObj->IsImage()) {
@@ -1016,7 +1016,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
}
FX_RECT clip_box = m_pDevice->GetClipBox();
if (clip_box.IsEmpty()) {
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return;
}
CFX_Matrix dCTM = m_pDevice->GetCTM();
@@ -1084,9 +1084,9 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
pStates, &m_Options, pPattern->form()->m_Transparency,
m_bDropObjects, pFormResource);
status.RenderObjectList(pPattern->form(), &matrix);
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
}
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
delete pStates;
return;
}
@@ -1124,7 +1124,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
pObj2Device, width, height, m_Options.m_Flags);
}
if (!pPatternBitmap) {
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
return;
}
if (m_Options.m_ColorMode == RENDER_COLOR_GRAY) {
@@ -1178,7 +1178,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
}
CompositeDIBitmap(&screen, clip_box.left, clip_box.top, 0, 255,
FXDIB_BLEND_NORMAL, FALSE);
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
}
void CPDF_RenderStatus::DrawPathWithPattern(const CPDF_PathObject* pPathObj,
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index ce73208896..5bd7c35059 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -430,7 +430,7 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
status.m_Type3FontCache.Add(pType3Font);
m_pDevice->SaveState();
status.RenderObjectList(pType3Char->m_pForm.get(), &matrix);
- m_pDevice->RestoreState();
+ m_pDevice->RestoreState(false);
} else {
CFX_FloatRect rect_f = pType3Char->m_pForm->CalcBoundingBox();
rect_f.Transform(&matrix);