From 3c0f366daafed42495b22ecbdda8f21f3f939d9b Mon Sep 17 00:00:00 2001 From: npm Date: Mon, 28 Nov 2016 13:51:28 -0800 Subject: Add some methods in CPDF_ImageRenderer Made a member private and added some methods to reduce code duplication Review-Url: https://codereview.chromium.org/2531643002 --- core/fpdfapi/render/cpdf_imagerenderer.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/render/cpdf_imagerenderer.h') diff --git a/core/fpdfapi/render/cpdf_imagerenderer.h b/core/fpdfapi/render/cpdf_imagerenderer.h index b0550e7441..d358716e9f 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.h +++ b/core/fpdfapi/render/cpdf_imagerenderer.h @@ -11,6 +11,7 @@ #include "core/fpdfapi/render/cpdf_imageloader.h" +class CFX_FxgeDevice; class CFX_ImageTransformer; class CPDF_ImageObject; class CPDF_PageObject; @@ -38,8 +39,7 @@ class CPDF_ImageRenderer { int blendType); bool Continue(IFX_Pause* pPause); - - bool m_Result; + bool GetResult() const { return m_Result; } private: bool StartBitmapAlpha(); @@ -48,6 +48,14 @@ class CPDF_ImageRenderer { bool StartLoadDIBSource(); bool DrawMaskedImage(); bool DrawPatternImage(const CFX_Matrix* pObj2Device); + bool NotDrawing() const; + FX_RECT GetDrawRect() const; + CFX_Matrix GetDrawMatrix(const FX_RECT& rect) const; + void CalculateDrawImage(CFX_FxgeDevice* bitmap_device1, + CFX_FxgeDevice* bitmap_device2, + const CFX_DIBSource* pDIBSource, + CFX_Matrix* pNewMatrix, + const FX_RECT& rect) const; CPDF_RenderStatus* m_pRenderStatus; CPDF_ImageObject* m_pImageObject; @@ -66,6 +74,7 @@ class CPDF_ImageRenderer { void* m_DeviceHandle; bool m_bStdCS; int m_BlendType; + bool m_Result; }; #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGERENDERER_H_ -- cgit v1.2.3