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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 893493002: Merge to XFA: Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_render.h" 7 #include "../../../include/fpdfapi/fpdf_render.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../fpdf_page/pageint.h" 9 #include "../fpdf_page/pageint.h"
10 #include "../../../include/fxge/fx_ge.h" 10 #include "../../../include/fxge/fx_ge.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int fg = FXSYS_GetGValue(m_ForeColor); 173 int fg = FXSYS_GetGValue(m_ForeColor);
174 int fb = FXSYS_GetBValue(m_ForeColor); 174 int fb = FXSYS_GetBValue(m_ForeColor);
175 int br = FXSYS_GetRValue(m_BackColor); 175 int br = FXSYS_GetRValue(m_BackColor);
176 int bg = FXSYS_GetGValue(m_BackColor); 176 int bg = FXSYS_GetGValue(m_BackColor);
177 int bb = FXSYS_GetBValue(m_BackColor); 177 int bb = FXSYS_GetBValue(m_BackColor);
178 r = (br - fr) * gray / 255 + fr; 178 r = (br - fr) * gray / 255 + fr;
179 g = (bg - fg) * gray / 255 + fg; 179 g = (bg - fg) * gray / 255 + fg;
180 b = (bb - fb) * gray / 255 + fb; 180 b = (bb - fb) * gray / 255 + fb;
181 return ArgbEncode(a, r, g, b); 181 return ArgbEncode(a, r, g, b);
182 } 182 }
183
184 // static
185 int CPDF_RenderStatus::s_CurrentRecursionDepth = 0;
186
183 CPDF_RenderStatus::CPDF_RenderStatus() 187 CPDF_RenderStatus::CPDF_RenderStatus()
184 { 188 {
185 m_pContext = NULL; 189 m_pContext = NULL;
186 m_bStopped = FALSE; 190 m_bStopped = FALSE;
187 m_Level = 0;
188 m_pDevice = NULL; 191 m_pDevice = NULL;
189 m_pCurObj = NULL; 192 m_pCurObj = NULL;
190 m_pStopObj = NULL; 193 m_pStopObj = NULL;
191 m_HalftoneLimit = 0; 194 m_HalftoneLimit = 0;
192 m_pObjectRenderer = NULL; 195 m_pObjectRenderer = NULL;
193 m_bPrint = FALSE; 196 m_bPrint = FALSE;
194 m_Transparency = 0; 197 m_Transparency = 0;
195 m_DitherBits = 0; 198 m_DitherBits = 0;
196 m_bDropObjects = FALSE; 199 m_bDropObjects = FALSE;
197 m_bStdCS = FALSE; 200 m_bStdCS = FALSE;
198 m_GroupFamily = 0; 201 m_GroupFamily = 0;
199 m_bLoadMask = FALSE; 202 m_bLoadMask = FALSE;
200 m_pType3Char = NULL; 203 m_pType3Char = NULL;
201 m_T3FillColor = 0; 204 m_T3FillColor = 0;
202 m_pFormResource = NULL; 205 m_pFormResource = NULL;
203 m_pPageResource = NULL; 206 m_pPageResource = NULL;
204 m_curBlend = FXDIB_BLEND_NORMAL; 207 m_curBlend = FXDIB_BLEND_NORMAL;
205 } 208 }
209
206 CPDF_RenderStatus::~CPDF_RenderStatus() 210 CPDF_RenderStatus::~CPDF_RenderStatus()
207 { 211 {
208 if (m_pObjectRenderer) { 212 if (m_pObjectRenderer) {
209 delete m_pObjectRenderer; 213 delete m_pObjectRenderer;
210 } 214 }
211 } 215 }
212 FX_BOOL CPDF_RenderStatus::Initialize(int level, CPDF_RenderContext* pContext, C FX_RenderDevice* pDevice, 216
217 FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext, CFX_RenderDe vice* pDevice,
213 const CFX_AffineMatrix* pDeviceMatrix, con st CPDF_PageObject* pStopObj, 218 const CFX_AffineMatrix* pDeviceMatrix, con st CPDF_PageObject* pStopObj,
214 const CPDF_RenderStatus* pParentState, con st CPDF_GraphicStates* pInitialStates, 219 const CPDF_RenderStatus* pParentState, con st CPDF_GraphicStates* pInitialStates,
215 const CPDF_RenderOptions* pOptions, int tr ansparency, FX_BOOL bDropObjects, 220 const CPDF_RenderOptions* pOptions, int tr ansparency, FX_BOOL bDropObjects,
216 CPDF_Dictionary* pFormResource, FX_BOOL bS tdCS, CPDF_Type3Char* pType3Char, 221 CPDF_Dictionary* pFormResource, FX_BOOL bS tdCS, CPDF_Type3Char* pType3Char,
217 FX_ARGB fill_color, FX_DWORD GroupFamily, 222 FX_ARGB fill_color, FX_DWORD GroupFamily,
218 FX_BOOL bLoadMask) 223 FX_BOOL bLoadMask)
219 { 224 {
220 m_Level = level;
221 m_pContext = pContext; 225 m_pContext = pContext;
222 m_pDevice = pDevice; 226 m_pDevice = pDevice;
223 m_DitherBits = pDevice->GetDeviceCaps(FXDC_DITHER_BITS); 227 m_DitherBits = pDevice->GetDeviceCaps(FXDC_DITHER_BITS);
224 m_bPrint = m_pDevice->GetDeviceClass() != FXDC_DISPLAY; 228 m_bPrint = m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
225 if (pDeviceMatrix) { 229 if (pDeviceMatrix) {
226 m_DeviceMatrix = *pDeviceMatrix; 230 m_DeviceMatrix = *pDeviceMatrix;
227 } 231 }
228 m_pStopObj = pStopObj; 232 m_pStopObj = pStopObj;
229 if (pOptions) { 233 if (pOptions) {
230 m_Options = *pOptions; 234 m_Options = *pOptions;
(...skipping 24 matching lines...) Expand all
255 } 259 }
256 } else { 260 } else {
257 m_InitialStates.DefaultStates(); 261 m_InitialStates.DefaultStates();
258 } 262 }
259 m_pObjectRenderer = NULL; 263 m_pObjectRenderer = NULL;
260 m_Transparency = transparency; 264 m_Transparency = transparency;
261 return TRUE; 265 return TRUE;
262 } 266 }
263 void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjects* pObjs, const CF X_AffineMatrix* pObj2Device) 267 void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjects* pObjs, const CF X_AffineMatrix* pObj2Device)
264 { 268 {
265 if (m_Level > 32) {
266 return;
267 }
268 CFX_FloatRect clip_rect = m_pDevice->GetClipBox(); 269 CFX_FloatRect clip_rect = m_pDevice->GetClipBox();
269 CFX_AffineMatrix device2object; 270 CFX_AffineMatrix device2object;
270 device2object.SetReverse(*pObj2Device); 271 device2object.SetReverse(*pObj2Device);
271 device2object.TransformRect(clip_rect); 272 device2object.TransformRect(clip_rect);
272 int index = 0; 273 int index = 0;
273 FX_POSITION pos = pObjs->GetFirstObjectPosition(); 274 FX_POSITION pos = pObjs->GetFirstObjectPosition();
274 while(pos) { 275 while(pos) {
275 index ++; 276 index ++;
276 CPDF_PageObject* pCurObj = pObjs->GetNextObject(pos); 277 CPDF_PageObject* pCurObj = pObjs->GetNextObject(pos);
277 if (pCurObj == m_pStopObj) { 278 if (pCurObj == m_pStopObj) {
278 m_bStopped = TRUE; 279 m_bStopped = TRUE;
279 return; 280 return;
280 } 281 }
281 if (!pCurObj) { 282 if (!pCurObj) {
282 continue; 283 continue;
283 } 284 }
284 if(pCurObj == NULL || pCurObj->m_Left > clip_rect.right || pCurObj->m_Ri ght < clip_rect.left || 285 if(pCurObj == NULL || pCurObj->m_Left > clip_rect.right || pCurObj->m_Ri ght < clip_rect.left ||
285 pCurObj->m_Bottom > clip_rect.top || pCurObj->m_Top < clip_rect. bottom) { 286 pCurObj->m_Bottom > clip_rect.top || pCurObj->m_Top < clip_rect. bottom) {
286 continue; 287 continue;
287 } 288 }
288 RenderSingleObject(pCurObj, pObj2Device); 289 RenderSingleObject(pCurObj, pObj2Device);
289 if (m_bStopped) { 290 if (m_bStopped) {
290 return; 291 return;
291 } 292 }
292 } 293 }
293 } 294 }
294 void CPDF_RenderStatus::RenderSingleObject(const CPDF_PageObject* pObj, const CF X_AffineMatrix* pObj2Device) 295 void CPDF_RenderStatus::RenderSingleObject(const CPDF_PageObject* pObj, const CF X_AffineMatrix* pObj2Device)
295 { 296 {
296 if (m_Level > 32) { 297 CFX_AutoRestorer<int> restorer(&s_CurrentRecursionDepth);
298 if (++s_CurrentRecursionDepth > kRenderMaxRecursionDepth) {
297 return; 299 return;
298 } 300 }
299 m_pCurObj = pObj; 301 m_pCurObj = pObj;
300 if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull()) 302 if (m_Options.m_pOCContext && pObj->m_ContentMark.NotNull()) {
301 if (!m_Options.m_pOCContext->CheckObjectVisible(pObj)) { 303 if (!m_Options.m_pOCContext->CheckObjectVisible(pObj)) {
302 return; 304 return;
303 } 305 }
306 }
304 ProcessClipPath(pObj->m_ClipPath, pObj2Device); 307 ProcessClipPath(pObj->m_ClipPath, pObj2Device);
305 if (ProcessTransparency(pObj, pObj2Device)) { 308 if (ProcessTransparency(pObj, pObj2Device)) {
306 return; 309 return;
307 } 310 }
308 ProcessObjectNoClip(pObj, pObj2Device); 311 ProcessObjectNoClip(pObj, pObj2Device);
309 } 312 }
310 FX_BOOL CPDF_RenderStatus::ContinueSingleObject(const CPDF_PageObject* pObj, con st CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause) 313 FX_BOOL CPDF_RenderStatus::ContinueSingleObject(const CPDF_PageObject* pObj, con st CFX_AffineMatrix* pObj2Device, IFX_Pause* pPause)
311 { 314 {
312 if (m_pObjectRenderer) { 315 if (m_pObjectRenderer) {
313 if (m_pObjectRenderer->Continue(pPause)) { 316 if (m_pObjectRenderer->Continue(pPause)) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 matrix.Concat(*buffer.GetMatrix()); 458 matrix.Concat(*buffer.GetMatrix());
456 GetScaledMatrix(matrix); 459 GetScaledMatrix(matrix);
457 CPDF_Dictionary* pFormResource = NULL; 460 CPDF_Dictionary* pFormResource = NULL;
458 if (pObj->m_Type == PDFPAGE_FORM) { 461 if (pObj->m_Type == PDFPAGE_FORM) {
459 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pObj; 462 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pObj;
460 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) { 463 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
461 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("Re sources")); 464 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("Re sources"));
462 } 465 }
463 } 466 }
464 CPDF_RenderStatus status; 467 CPDF_RenderStatus status;
465 status.Initialize(m_Level + 1, m_pContext, buffer.GetDevice(), buffer.GetMat rix(), NULL, NULL, NULL, &m_Options, m_Transparency, m_bDropObjects, pFormResour ce); 468 status.Initialize(m_pContext, buffer.GetDevice(), buffer.GetMatrix(), NULL, NULL, NULL, &m_Options, m_Transparency, m_bDropObjects, pFormResource);
466 status.RenderSingleObject(pObj, &matrix); 469 status.RenderSingleObject(pObj, &matrix);
467 buffer.OutputToDevice(); 470 buffer.OutputToDevice();
468 } 471 }
469 FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj, const CFX_Affi neMatrix* pObj2Device) 472 FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj, const CFX_Affi neMatrix* pObj2Device)
470 { 473 {
471 CPDF_Dictionary* pOC = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("OC" )); 474 CPDF_Dictionary* pOC = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("OC" ));
472 if (pOC && m_Options.m_pOCContext && !m_Options.m_pOCContext->CheckOCGVisibl e(pOC)) { 475 if (pOC && m_Options.m_pOCContext && !m_Options.m_pOCContext->CheckOCGVisibl e(pOC)) {
473 return TRUE; 476 return TRUE;
474 } 477 }
475 CFX_AffineMatrix matrix = pFormObj->m_FormMatrix; 478 CFX_AffineMatrix matrix = pFormObj->m_FormMatrix;
476 matrix.Concat(*pObj2Device); 479 matrix.Concat(*pObj2Device);
477 CPDF_Dictionary* pResources = NULL; 480 CPDF_Dictionary* pResources = NULL;
478 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) { 481 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
479 pResources = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("Resources ")); 482 pResources = pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("Resources "));
480 } 483 }
481 CPDF_RenderStatus status; 484 CPDF_RenderStatus status;
482 status.Initialize(m_Level + 1, m_pContext, m_pDevice, NULL, m_pStopObj, 485 status.Initialize(m_pContext, m_pDevice, NULL, m_pStopObj,
483 this, pFormObj, &m_Options, m_Transparency, m_bDropObjects , pResources, FALSE); 486 this, pFormObj, &m_Options, m_Transparency, m_bDropObjects , pResources, FALSE);
484 status.m_curBlend = m_curBlend; 487 status.m_curBlend = m_curBlend;
485 m_pDevice->SaveState(); 488 m_pDevice->SaveState();
486 status.RenderObjectList(pFormObj->m_pForm, &matrix); 489 status.RenderObjectList(pFormObj->m_pForm, &matrix);
487 m_bStopped = status.m_bStopped; 490 m_bStopped = status.m_bStopped;
488 m_pDevice->RestoreState(); 491 m_pDevice->RestoreState();
489 return TRUE; 492 return TRUE;
490 } 493 }
491 FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix) 494 FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix)
492 { 495 {
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 break; 833 break;
831 } 834 }
832 CFX_AffineMatrix text_matrix; 835 CFX_AffineMatrix text_matrix;
833 textobj->GetTextMatrix(&text_matrix); 836 textobj->GetTextMatrix(&text_matrix);
834 CPDF_TextRenderer::DrawTextPath(&text_device, textobj->m_nChars, tex tobj->m_pCharCodes, textobj->m_pCharPos, 837 CPDF_TextRenderer::DrawTextPath(&text_device, textobj->m_nChars, tex tobj->m_pCharCodes, textobj->m_pCharPos,
835 textobj->m_TextState.GetFont(), text obj->m_TextState.GetFontSize(), 838 textobj->m_TextState.GetFont(), text obj->m_TextState.GetFontSize(),
836 &text_matrix, &new_matrix, textobj-> m_GraphState, (FX_ARGB) - 1, 0, NULL); 839 &text_matrix, &new_matrix, textobj-> m_GraphState, (FX_ARGB) - 1, 0, NULL);
837 } 840 }
838 } 841 }
839 CPDF_RenderStatus bitmap_render; 842 CPDF_RenderStatus bitmap_render;
840 bitmap_render.Initialize(m_Level + 1, m_pContext, &bitmap_device, NULL, 843 bitmap_render.Initialize(m_pContext, &bitmap_device, NULL,
841 m_pStopObj, NULL, NULL, &m_Options, 0, m_bDropObjec ts, pFormResource, TRUE); 844 m_pStopObj, NULL, NULL, &m_Options, 0, m_bDropObjec ts, pFormResource, TRUE);
842 bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix); 845 bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix);
843 m_bStopped = bitmap_render.m_bStopped; 846 m_bStopped = bitmap_render.m_bStopped;
844 if (pSMaskDict) { 847 if (pSMaskDict) {
845 CFX_AffineMatrix smask_matrix; 848 CFX_AffineMatrix smask_matrix;
846 FXSYS_memcpy32(&smask_matrix, pGeneralState->m_SMaskMatrix, sizeof smask _matrix); 849 FXSYS_memcpy32(&smask_matrix, pGeneralState->m_SMaskMatrix, sizeof smask _matrix);
847 smask_matrix.Concat(*pObj2Device); 850 smask_matrix.Concat(*pObj2Device);
848 CFX_DIBSource* pSMaskSource = LoadSMask(pSMaskDict, &rect, &smask_matrix ); 851 CFX_DIBSource* pSMaskSource = LoadSMask(pSMaskDict, &rect, &smask_matrix );
849 if (pSMaskSource) { 852 if (pSMaskSource) {
850 bitmap->MultiplyAlpha(pSMaskSource); 853 bitmap->MultiplyAlpha(pSMaskSource);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 const CPDF_RenderOptions* pOptions, const CFX_Af fineMatrix* pLastMatrix) 997 const CPDF_RenderOptions* pOptions, const CFX_Af fineMatrix* pLastMatrix)
995 { 998 {
996 int count = m_ContentList.GetSize(); 999 int count = m_ContentList.GetSize();
997 for (int j = 0; j < count; j ++) { 1000 for (int j = 0; j < count; j ++) {
998 pDevice->SaveState(); 1001 pDevice->SaveState();
999 _PDF_RenderItem* pItem = m_ContentList.GetDataPtr(j); 1002 _PDF_RenderItem* pItem = m_ContentList.GetDataPtr(j);
1000 if (pLastMatrix) { 1003 if (pLastMatrix) {
1001 CFX_AffineMatrix FinalMatrix = pItem->m_Matrix; 1004 CFX_AffineMatrix FinalMatrix = pItem->m_Matrix;
1002 FinalMatrix.Concat(*pLastMatrix); 1005 FinalMatrix.Concat(*pLastMatrix);
1003 CPDF_RenderStatus status; 1006 CPDF_RenderStatus status;
1004 status.Initialize(0, this, pDevice, pLastMatrix, pStopObj, NULL, NUL L, pOptions, 1007 status.Initialize(this, pDevice, pLastMatrix, pStopObj, NULL, NULL, pOptions,
1005 pItem->m_pObjectList->m_Transparency, FALSE, NULL) ; 1008 pItem->m_pObjectList->m_Transparency, FALSE, NULL) ;
1006 status.RenderObjectList(pItem->m_pObjectList, &FinalMatrix); 1009 status.RenderObjectList(pItem->m_pObjectList, &FinalMatrix);
1007 if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) { 1010 if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) {
1008 m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheS ize); 1011 m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheS ize);
1009 } 1012 }
1010 if (status.m_bStopped) { 1013 if (status.m_bStopped) {
1011 pDevice->RestoreState(); 1014 pDevice->RestoreState();
1012 break; 1015 break;
1013 } 1016 }
1014 } else { 1017 } else {
1015 CPDF_RenderStatus status; 1018 CPDF_RenderStatus status;
1016 status.Initialize(0, this, pDevice, NULL, pStopObj, NULL, NULL, pOpt ions, 1019 status.Initialize(this, pDevice, NULL, pStopObj, NULL, NULL, pOption s,
1017 pItem->m_pObjectList->m_Transparency, FALSE, NULL) ; 1020 pItem->m_pObjectList->m_Transparency, FALSE, NULL) ;
1018 status.RenderObjectList(pItem->m_pObjectList, &pItem->m_Matrix); 1021 status.RenderObjectList(pItem->m_pObjectList, &pItem->m_Matrix);
1019 if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) { 1022 if (status.m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) {
1020 m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheS ize); 1023 m_pPageCache->CacheOptimization(status.m_Options.m_dwLimitCacheS ize);
1021 } 1024 }
1022 if (status.m_bStopped) { 1025 if (status.m_bStopped) {
1023 pDevice->RestoreState(); 1026 pDevice->RestoreState();
1024 break; 1027 break;
1025 } 1028 }
1026 } 1029 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 pItem->m_pObjectList->GetNextObject(m_ObjectPos); 1113 pItem->m_pObjectList->GetNextObject(m_ObjectPos);
1111 } else { 1114 } else {
1112 m_ObjectPos = pItem->m_pObjectList->GetFirstObjectPosition(); 1115 m_ObjectPos = pItem->m_pObjectList->GetFirstObjectPosition();
1113 } 1116 }
1114 m_PrevLastPos = LastPos; 1117 m_PrevLastPos = LastPos;
1115 } 1118 }
1116 if (m_pRenderer == NULL) { 1119 if (m_pRenderer == NULL) {
1117 m_ObjectPos = pItem->m_pObjectList->GetFirstObjectPosition(); 1120 m_ObjectPos = pItem->m_pObjectList->GetFirstObjectPosition();
1118 m_ObjectIndex = 0; 1121 m_ObjectIndex = 0;
1119 m_pRenderer = FX_NEW CPDF_RenderStatus(); 1122 m_pRenderer = FX_NEW CPDF_RenderStatus();
1120 m_pRenderer->Initialize(0, m_pContext, m_pDevice, NULL, NULL, NULL, NULL, 1123 m_pRenderer->Initialize(m_pContext, m_pDevice, NULL, NULL, NULL, NUL L,
1121 m_pOptions, pItem->m_pObjectList->m_Transpar ency, m_bDropObjects, NULL); 1124 m_pOptions, pItem->m_pObjectList->m_Transpar ency, m_bDropObjects, NULL);
1122 m_pDevice->SaveState(); 1125 m_pDevice->SaveState();
1123 m_ClipRect = m_pDevice->GetClipBox(); 1126 m_ClipRect = m_pDevice->GetClipBox();
1124 CFX_AffineMatrix device2object; 1127 CFX_AffineMatrix device2object;
1125 device2object.SetReverse(pItem->m_Matrix); 1128 device2object.SetReverse(pItem->m_Matrix);
1126 device2object.TransformRect(m_ClipRect); 1129 device2object.TransformRect(m_ClipRect);
1127 } 1130 }
1128 int objs_to_go = CPDF_ModuleMgr::Get()->GetRenderModule()->GetConfig()-> m_RenderStepLimit; 1131 int objs_to_go = CPDF_ModuleMgr::Get()->GetRenderModule()->GetConfig()-> m_RenderStepLimit;
1129 while (m_ObjectPos) { 1132 while (m_ObjectPos) {
1130 CPDF_PageObject* pCurObj = pItem->m_pObjectList->GetObjectAt(m_Objec tPos); 1133 CPDF_PageObject* pCurObj = pItem->m_pObjectList->GetObjectAt(m_Objec tPos);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 CPDF_ContentMarkItem& item = pData->GetItem(i); 1423 CPDF_ContentMarkItem& item = pData->GetItem(i);
1421 if (item.GetName() == FX_BSTRC("OC") && item.GetParamType() == CPDF_Cont entMarkItem::PropertiesDict) { 1424 if (item.GetName() == FX_BSTRC("OC") && item.GetParamType() == CPDF_Cont entMarkItem::PropertiesDict) {
1422 CPDF_Dictionary* pOCG = (CPDF_Dictionary*)item.GetParam(); 1425 CPDF_Dictionary* pOCG = (CPDF_Dictionary*)item.GetParam();
1423 if (!CheckOCGVisible(pOCG)) { 1426 if (!CheckOCGVisible(pOCG)) {
1424 return FALSE; 1427 return FALSE;
1425 } 1428 }
1426 } 1429 }
1427 } 1430 }
1428 return TRUE; 1431 return TRUE;
1429 } 1432 }
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698