summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfeditimg.cpp2
-rw-r--r--fpdfsdk/fpdfeditpage.cpp12
2 files changed, 4 insertions, 10 deletions
diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
index 1fe832b877..d64626711a 100644
--- a/fpdfsdk/fpdfeditimg.cpp
+++ b/fpdfsdk/fpdfeditimg.cpp
@@ -33,7 +33,6 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
IFX_FileRead* pFile = new CPDF_CustomAccess(fileAccess);
CPDF_ImageObject* pImgObj = reinterpret_cast<CPDF_ImageObject*>(image_object);
- pImgObj->m_GeneralState.GetPrivateCopy();
for (int index = 0; index < nCount; index++) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]);
if (pPage)
@@ -73,7 +72,6 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
return FALSE;
CPDF_ImageObject* pImgObj = reinterpret_cast<CPDF_ImageObject*>(image_object);
- pImgObj->m_GeneralState.GetPrivateCopy();
for (int index = 0; index < nCount; index++) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]);
if (pPage)
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 1301018709..d11bfa9474 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;
}