diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-05 10:27:45 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-05 17:04:57 +0000 |
commit | 4ce4f5f8ab0b25ac10a5c66cac1a8c281e24a69b (patch) | |
tree | 7853cdd1e63d94c01b1893fef0722433400033a9 /core/fpdfapi/render/cpdf_renderstatus.h | |
parent | 645e78a1152b035fb83ac5bbe93715b54f11a1b6 (diff) | |
download | pdfium-4ce4f5f8ab0b25ac10a5c66cac1a8c281e24a69b.tar.xz |
Cleanup CPDF_RenderStatus
This CL removes friend classes and moves public members to be private in
the CPDF_RenderStatus class.
Change-Id: Icdd6291bb8c1e5f43386d4a939b1eeaa16b8886d
Reviewed-on: https://pdfium-review.googlesource.com/15530
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.h')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.h | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h index def3702e68..102bc2f2e6 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.h +++ b/core/fpdfapi/render/cpdf_renderstatus.h @@ -64,21 +64,41 @@ class CPDF_RenderStatus { IFX_PauseIndicator* pPause); void ProcessClipPath(const CPDF_ClipPath& ClipPath, const CFX_Matrix* pObj2Device); + + uint32_t GetGroupFamily() const { return m_GroupFamily; } + bool GetLoadMask() const { return m_bLoadMask; } + bool GetDropObjects() const { return m_bDropObjects; } + bool IsPrint() const { return m_bPrint; } + bool IsStopped() const { return m_bStopped; } CPDF_RenderContext* GetContext() const { return m_pContext.Get(); } + CPDF_Dictionary* GetFormResource() const { return m_pFormResource.Get(); } + CPDF_Dictionary* GetPageResource() const { return m_pPageResource.Get(); } + CFX_RenderDevice* GetRenderDevice() const { return m_pDevice; } + const CPDF_RenderOptions* GetRenderOptions() const { return &m_Options; } #if defined _SKIA_SUPPORT_ void DebugVerifyDeviceIsPreMultiplied() const; #endif - CPDF_RenderOptions m_Options; - UnownedPtr<CPDF_Dictionary> m_pFormResource; - UnownedPtr<CPDF_Dictionary> m_pPageResource; - std::vector<CPDF_Type3Font*> m_Type3FontCache; + RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const; + FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const; + void DrawTilingPattern(CPDF_TilingPattern* pPattern, + CPDF_PageObject* pPageObj, + const CFX_Matrix* pObj2Device, + bool bStroke); + void DrawShadingPattern(CPDF_ShadingPattern* pPattern, + const CPDF_PageObject* pPageObj, + const CFX_Matrix* pObj2Device, + bool bStroke); + void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap, + int left, + int top, + FX_ARGB mask_argb, + int bitmap_alpha, + int blend_mode, + int bIsolated); private: - friend class CPDF_ImageRenderer; - friend class CPDF_RenderContext; - bool ProcessTransparency(CPDF_PageObject* PageObj, const CFX_Matrix* pObj2Device); void ProcessObjectNoClip(CPDF_PageObject* PageObj, @@ -95,25 +115,10 @@ class CPDF_RenderStatus { const CFX_Matrix* pObj2Device, const CPDF_Color* pColor, bool bStroke); - void DrawTilingPattern(CPDF_TilingPattern* pPattern, - CPDF_PageObject* pPageObj, - const CFX_Matrix* pObj2Device, - bool bStroke); - void DrawShadingPattern(CPDF_ShadingPattern* pPattern, - const CPDF_PageObject* pPageObj, - const CFX_Matrix* pObj2Device, - bool bStroke); bool SelectClipPath(const CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device, bool bStroke); bool ProcessImage(CPDF_ImageObject* pImageObj, const CFX_Matrix* pObj2Device); - void CompositeDIBitmap(const RetainPtr<CFX_DIBitmap>& pDIBitmap, - int left, - int top, - FX_ARGB mask_argb, - int bitmap_alpha, - int blend_mode, - int bIsolated); void ProcessShading(const CPDF_ShadingObject* pShadingObj, const CFX_Matrix* pObj2Device); void DrawShading(CPDF_ShadingPattern* pPattern, @@ -147,8 +152,6 @@ class CPDF_RenderStatus { static std::unique_ptr<CPDF_GraphicStates> CloneObjStates( const CPDF_GraphicStates* pPathObj, bool bStroke); - RetainPtr<CPDF_TransferFunc> GetTransferFunc(CPDF_Object* pObject) const; - FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const; FX_ARGB GetStrokeArgb(CPDF_PageObject* pObj) const; bool GetObjectClippedRect(const CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device, @@ -159,6 +162,10 @@ class CPDF_RenderStatus { static const int kRenderMaxRecursionDepth = 64; static int s_CurrentRecursionDepth; + CPDF_RenderOptions m_Options; + UnownedPtr<CPDF_Dictionary> m_pFormResource; + UnownedPtr<CPDF_Dictionary> m_pPageResource; + std::vector<CPDF_Type3Font*> m_Type3FontCache; UnownedPtr<CPDF_RenderContext> m_pContext; bool m_bStopped; CFX_RenderDevice* m_pDevice; |