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

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp

Issue 1414283003: Revert "Make m_pShadingObj a CPDF_Stream instead of CPDF_Object." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "pageint.h" 8 #include "pageint.h"
9 9
10 CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix) 10 CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const CFX_AffineMatrix* parentMatrix) 64 const CFX_AffineMatrix* parentMatrix)
65 : CPDF_Pattern(parentMatrix) { 65 : CPDF_Pattern(parentMatrix) {
66 m_PatternType = PATTERN_SHADING; 66 m_PatternType = PATTERN_SHADING;
67 m_pPatternObj = bShading ? NULL : pPatternObj; 67 m_pPatternObj = bShading ? NULL : pPatternObj;
68 m_pDocument = pDoc; 68 m_pDocument = pDoc;
69 m_bShadingObj = bShading; 69 m_bShadingObj = bShading;
70 if (!bShading) { 70 if (!bShading) {
71 CPDF_Dictionary* pDict = m_pPatternObj->GetDict(); 71 CPDF_Dictionary* pDict = m_pPatternObj->GetDict();
72 ASSERT(pDict != NULL); 72 ASSERT(pDict != NULL);
73 m_Pattern2Form = pDict->GetMatrix(FX_BSTRC("Matrix")); 73 m_Pattern2Form = pDict->GetMatrix(FX_BSTRC("Matrix"));
74 m_pShadingObj = ToStream(pDict->GetElementValue(FX_BSTRC("Shading"))); 74 m_pShadingObj = pDict->GetElementValue(FX_BSTRC("Shading"));
75 if (parentMatrix) { 75 if (parentMatrix) {
76 m_Pattern2Form.Concat(*parentMatrix); 76 m_Pattern2Form.Concat(*parentMatrix);
77 } 77 }
78 } else { 78 } else {
79 m_pShadingObj = ToStream(pPatternObj); 79 m_pShadingObj = pPatternObj;
80 } 80 }
81 m_ShadingType = 0; 81 m_ShadingType = 0;
82 m_pCS = NULL; 82 m_pCS = NULL;
83 m_nFuncs = 0; 83 m_nFuncs = 0;
84 for (int i = 0; i < 4; i++) { 84 for (int i = 0; i < 4; i++) {
85 m_pFunctions[i] = NULL; 85 m_pFunctions[i] = NULL;
86 } 86 }
87 m_pCountedCS = NULL; 87 m_pCountedCS = NULL;
88 } 88 }
89 CPDF_ShadingPattern::~CPDF_ShadingPattern() { 89 CPDF_ShadingPattern::~CPDF_ShadingPattern() {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 } 288 }
289 stream.m_BitStream.SkipBits(stream.m_nComps * stream.m_nCompBits * 289 stream.m_BitStream.SkipBits(stream.m_nComps * stream.m_nCompBits *
290 color_count); 290 color_count);
291 if (bGouraud) 291 if (bGouraud)
292 stream.m_BitStream.ByteAlign(); 292 stream.m_BitStream.ByteAlign();
293 } 293 }
294 rect.Transform(pMatrix); 294 rect.Transform(pMatrix);
295 return rect; 295 return rect;
296 } 296 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698