Convert CPDF_GeneralState::m_pSoftMask to CPDF_Dictionary.
Currently, it is being stored as a CPDF_Object, but it is always
a dictionary, so avoid some ToDictionary() calls.
Change-Id: I04416665e36d5681d56798deb21a4c20985c0477
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96311
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index a6fa591..7092a09 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -485,8 +485,7 @@
if (pPageObj->m_GeneralState.GetBlendType() != BlendMode::kNormal)
return true;
- const CPDF_Dictionary* pSMaskDict =
- ToDictionary(pPageObj->m_GeneralState.GetSoftMask());
+ const CPDF_Dictionary* pSMaskDict = pPageObj->m_GeneralState.GetSoftMask();
if (pSMaskDict)
return true;