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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp

Issue 1923153002: CPDF_Document::LoadPattern() and friends always have a valid matrix. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@clean_doc2
Patch Set: rebase Created 4 years, 8 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 | « core/fpdfapi/fpdf_page/cpdf_shadingpattern.h ('k') | core/fpdfapi/fpdf_page/cpdf_tilingpattern.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
index 457de9667af217e8f87a72e051cb57e5f837338d..b7174b4451140934ea95d7dd59594729f0a006ed 100644
--- a/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp
@@ -25,7 +25,7 @@ ShadingType ToShadingType(int type) {
CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_Matrix* parentMatrix)
+ const CFX_Matrix& parentMatrix)
: CPDF_Pattern(SHADING,
pDoc,
bShading ? nullptr : pPatternObj,
@@ -40,8 +40,7 @@ CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Dictionary* pDict = m_pPatternObj->GetDict();
m_Pattern2Form = pDict->GetMatrixBy("Matrix");
m_pShadingObj = pDict->GetDirectObjectBy("Shading");
- if (parentMatrix)
- m_Pattern2Form.Concat(*parentMatrix);
+ m_Pattern2Form.Concat(parentMatrix);
}
for (size_t i = 0; i < FX_ArraySize(m_pFunctions); ++i)
m_pFunctions[i] = nullptr;
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_shadingpattern.h ('k') | core/fpdfapi/fpdf_page/cpdf_tilingpattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698