Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1092)

Unified Diff: fpdfsdk/fpdfeditpage.cpp

Issue 2303553002: Make CPDF_GeneralState have a CPDF_GeneralStateData (Closed)
Patch Set: Nit Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfeditimg.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfeditpage.cpp
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 13010187098e72ea4a3aa20686697ded224c45f2..d11bfa9474148afdbc4458ca08fa0644f36a7d9e 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -222,23 +222,19 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
return FALSE;
CPDF_PageObject* pPageObj = reinterpret_cast<CPDF_PageObject*>(pageObject);
- const CPDF_GeneralStateData* pGeneralState =
- pPageObj->m_GeneralState.GetObject();
- int blend_type =
- pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL;
+ int blend_type = pPageObj->m_GeneralState.GetBlendType();
if (blend_type != FXDIB_BLEND_NORMAL)
return TRUE;
CPDF_Dictionary* pSMaskDict =
- pGeneralState ? ToDictionary(pGeneralState->m_pSoftMask) : nullptr;
+ ToDictionary(pPageObj->m_GeneralState.GetSoftMask());
if (pSMaskDict)
return TRUE;
- if (pGeneralState && pGeneralState->m_FillAlpha != 1.0f)
+ if (pPageObj->m_GeneralState.GetFillAlpha() != 1.0f)
return TRUE;
- if (pPageObj->IsPath() && pGeneralState &&
- pGeneralState->m_StrokeAlpha != 1.0f) {
+ if (pPageObj->IsPath() && pPageObj->m_GeneralState.GetStrokeAlpha() != 1.0f) {
return TRUE;
}
« no previous file with comments | « fpdfsdk/fpdfeditimg.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698