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

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

Issue 2302683002: Make StateData private (Closed)
Patch Set: Alphabetical order Created 4 years, 3 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 | « core/fpdfapi/fpdf_page/include/cpdf_generalstate.h ('k') | fpdfsdk/fpdfeditpage.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 "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 textobj->m_GraphState.GetObject(), (FX_ARGB)-1, 0, nullptr, 0); 797 textobj->m_GraphState.GetObject(), (FX_ARGB)-1, 0, nullptr, 0);
798 } 798 }
799 } 799 }
800 CPDF_RenderStatus bitmap_render; 800 CPDF_RenderStatus bitmap_render;
801 bitmap_render.Initialize(m_pContext, &bitmap_device, nullptr, m_pStopObj, 801 bitmap_render.Initialize(m_pContext, &bitmap_device, nullptr, m_pStopObj,
802 nullptr, nullptr, &m_Options, 0, m_bDropObjects, 802 nullptr, nullptr, &m_Options, 0, m_bDropObjects,
803 pFormResource, TRUE); 803 pFormResource, TRUE);
804 bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix); 804 bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix);
805 m_bStopped = bitmap_render.m_bStopped; 805 m_bStopped = bitmap_render.m_bStopped;
806 if (pSMaskDict) { 806 if (pSMaskDict) {
807 CFX_Matrix smask_matrix; 807 CFX_Matrix smask_matrix = *pPageObj->m_GeneralState.GetSMaskMatrix();
808 FXSYS_memcpy(&smask_matrix, pPageObj->m_GeneralState.GetSMaskMatrix(),
809 sizeof smask_matrix);
810 smask_matrix.Concat(*pObj2Device); 808 smask_matrix.Concat(*pObj2Device);
811 std::unique_ptr<CFX_DIBSource> pSMaskSource( 809 std::unique_ptr<CFX_DIBSource> pSMaskSource(
812 LoadSMask(pSMaskDict, &rect, &smask_matrix)); 810 LoadSMask(pSMaskDict, &rect, &smask_matrix));
813 if (pSMaskSource) 811 if (pSMaskSource)
814 bitmap->MultiplyAlpha(pSMaskSource.get()); 812 bitmap->MultiplyAlpha(pSMaskSource.get());
815 } 813 }
816 if (pTextMask) { 814 if (pTextMask) {
817 bitmap->MultiplyAlpha(pTextMask.get()); 815 bitmap->MultiplyAlpha(pTextMask.get());
818 pTextMask.reset(); 816 pTextMask.reset();
819 } 817 }
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, 1277 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left,
1280 m_Rect.top, m_Rect.Width(), m_Rect.Height()); 1278 m_Rect.top, m_Rect.Width(), m_Rect.Height());
1281 } 1279 }
1282 } 1280 }
1283 1281
1284 #if defined _SKIA_SUPPORT_ 1282 #if defined _SKIA_SUPPORT_
1285 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { 1283 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const {
1286 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); 1284 m_pDevice->DebugVerifyBitmapIsPreMultiplied();
1287 } 1285 }
1288 #endif 1286 #endif
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_generalstate.h ('k') | fpdfsdk/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698