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

Side by Side Diff: core/fpdfapi/render/cpdf_imagerenderer.cpp

Issue 2608663003: Pdfium Patch to restore PS Path (Closed)
Patch Set: Created 3 years, 11 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 | « BUILD.gn ('k') | core/fpdfapi/render/cpdf_renderoptions.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "core/fpdfapi/render/cpdf_imagerenderer.h" 7 #include "core/fpdfapi/render/cpdf_imagerenderer.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor, 116 m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor,
117 m_pRenderStatus->m_Options.m_ForeColor); 117 m_pRenderStatus->m_Options.m_ForeColor);
118 m_pDIBSource = m_pClone.get(); 118 m_pDIBSource = m_pClone.get();
119 } 119 }
120 m_Flags = 0; 120 m_Flags = 0;
121 if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_DOWNSAMPLE) 121 if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_DOWNSAMPLE)
122 m_Flags |= RENDER_FORCE_DOWNSAMPLE; 122 m_Flags |= RENDER_FORCE_DOWNSAMPLE;
123 else if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_HALFTONE) 123 else if (m_pRenderStatus->m_Options.m_Flags & RENDER_FORCE_HALFTONE)
124 m_Flags |= RENDER_FORCE_HALFTONE; 124 m_Flags |= RENDER_FORCE_HALFTONE;
125 if (m_pRenderStatus->m_pDevice->GetDeviceClass() != FXDC_DISPLAY) { 125 if (m_pRenderStatus->m_pDevice->GetDeviceClass() != FXDC_DISPLAY) {
126 if (m_pRenderStatus->m_Options.m_Flags & RENDER_COMPRESS_IMAGES)
127 m_Flags |= FXRENDER_IMAGE_LOSSY;
126 CPDF_Object* pFilters = 128 CPDF_Object* pFilters =
127 m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectFor( 129 m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectFor(
128 "Filter"); 130 "Filter");
129 if (pFilters) { 131 if (pFilters) {
130 if (pFilters->IsName()) { 132 if (pFilters->IsName()) {
131 CFX_ByteString bsDecodeType = pFilters->GetString(); 133 CFX_ByteString bsDecodeType = pFilters->GetString();
132 if (bsDecodeType == "DCTDecode" || bsDecodeType == "JPXDecode") 134 if (bsDecodeType == "DCTDecode" || bsDecodeType == "JPXDecode")
133 m_Flags |= FXRENDER_IMAGE_LOSSY; 135 m_Flags |= FXRENDER_IMAGE_LOSSY;
134 } else if (CPDF_Array* pArray = pFilters->AsArray()) { 136 } else if (CPDF_Array* pArray = pFilters->AsArray()) {
135 for (size_t i = 0; i < pArray->GetCount(); i++) { 137 for (size_t i = 0; i < pArray->GetCount(); i++) {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 565
564 if (m_Status == 4) { 566 if (m_Status == 4) {
565 if (m_Loader.Continue(pPause)) 567 if (m_Loader.Continue(pPause))
566 return true; 568 return true;
567 569
568 if (StartRenderDIBSource()) 570 if (StartRenderDIBSource())
569 return Continue(pPause); 571 return Continue(pPause);
570 } 572 }
571 return false; 573 return false;
572 } 574 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/render/cpdf_renderoptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698