summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/render_int.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-11-17 13:50:44 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-17 13:50:44 -0800
commit483f3c485ac727cbf74c89e3912e5a4475d5f8f9 (patch)
tree546976bd96b8bad85bdad99a131a5ce425359ce9 /core/fpdfapi/render/render_int.h
parentbcf4695095caa8ecc1b2df25992a7d06d58d80ac (diff)
downloadpdfium-483f3c485ac727cbf74c89e3912e5a4475d5f8f9.tar.xz
Move CPDF_RenderStatus from render_int
Moved CPDF_RenderStatus to its own class and removed unused methods. I only added some spaces and removed some {}s in cpdf_renderstatus.cpp. Will do cleanup of the file as a followup because it would be too hard to keep track of what's changed in this CL. Review-Url: https://codereview.chromium.org/2513693002
Diffstat (limited to 'core/fpdfapi/render/render_int.h')
-rw-r--r--core/fpdfapi/render/render_int.h155
1 files changed, 1 insertions, 154 deletions
diff --git a/core/fpdfapi/render/render_int.h b/core/fpdfapi/render/render_int.h
index a8c8a580de..4e45597693 100644
--- a/core/fpdfapi/render/render_int.h
+++ b/core/fpdfapi/render/render_int.h
@@ -15,6 +15,7 @@
#include "core/fpdfapi/page/cpdf_countedobject.h"
#include "core/fpdfapi/page/cpdf_graphicstates.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
+#include "core/fpdfapi/render/cpdf_rendercontext.h"
#include "core/fpdfapi/render/cpdf_renderoptions.h"
#include "core/fxge/cfx_fxgedevice.h"
#include "core/fxge/cfx_renderdevice.h"
@@ -63,160 +64,6 @@ class CPDF_TransferFunc {
uint8_t m_Samples[256 * 3];
};
-class CPDF_RenderStatus {
- public:
- CPDF_RenderStatus();
- ~CPDF_RenderStatus();
-
- bool Initialize(class CPDF_RenderContext* pContext,
- CFX_RenderDevice* pDevice,
- const CFX_Matrix* pDeviceMatrix,
- const CPDF_PageObject* pStopObj,
- const CPDF_RenderStatus* pParentStatus,
- const CPDF_GraphicStates* pInitialStates,
- const CPDF_RenderOptions* pOptions,
- int transparency,
- bool bDropObjects,
- CPDF_Dictionary* pFormResource = nullptr,
- bool bStdCS = false,
- CPDF_Type3Char* pType3Char = nullptr,
- FX_ARGB fill_color = 0,
- uint32_t GroupFamily = 0,
- bool bLoadMask = false);
- void RenderObjectList(const CPDF_PageObjectHolder* pObjectHolder,
- const CFX_Matrix* pObj2Device);
- void RenderSingleObject(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device);
- bool ContinueSingleObject(CPDF_PageObject* pObj,
- const CFX_Matrix* pObj2Device,
- IFX_Pause* pPause);
- CPDF_RenderContext* GetContext() { return m_pContext; }
-
-#if defined _SKIA_SUPPORT_
- void DebugVerifyDeviceIsPreMultiplied() const;
-#endif
-
- CPDF_RenderOptions m_Options;
- CPDF_Dictionary* m_pFormResource;
- CPDF_Dictionary* m_pPageResource;
- CFX_ArrayTemplate<CPDF_Type3Font*> m_Type3FontCache;
-
- protected:
- friend class CPDF_ImageRenderer;
- friend class CPDF_RenderContext;
-
- void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
- void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
- bool ProcessTransparency(CPDF_PageObject* PageObj,
- const CFX_Matrix* pObj2Device);
- void ProcessObjectNoClip(CPDF_PageObject* PageObj,
- const CFX_Matrix* pObj2Device);
- void DrawObjWithBackground(CPDF_PageObject* pObj,
- const CFX_Matrix* pObj2Device);
- bool DrawObjWithBlend(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device);
- bool ProcessPath(CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device);
- void ProcessPathPattern(CPDF_PathObject* pPathObj,
- const CFX_Matrix* pObj2Device,
- int& filltype,
- bool& bStroke);
- void DrawPathWithPattern(CPDF_PathObject* pPathObj,
- 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);
- bool OutputBitmapAlpha(CPDF_ImageObject* pImageObj,
- const CFX_Matrix* pImage2Device);
- bool OutputImage(CPDF_ImageObject* pImageObj,
- const CFX_Matrix* pImage2Device);
- bool OutputDIBSource(const CFX_DIBSource* pOutputBitmap,
- FX_ARGB fill_argb,
- int bitmap_alpha,
- const CFX_Matrix* pImage2Device,
- CPDF_ImageCacheEntry* pImageCache,
- uint32_t flags);
- void CompositeDIBitmap(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,
- CFX_Matrix* pMatrix,
- FX_RECT& clip_rect,
- int alpha,
- bool bAlphaMode);
- bool ProcessType3Text(CPDF_TextObject* textobj,
- const CFX_Matrix* pObj2Device);
- bool ProcessText(CPDF_TextObject* textobj,
- const CFX_Matrix* pObj2Device,
- CFX_PathData* pClippingPath);
- void DrawTextPathWithPattern(const CPDF_TextObject* textobj,
- const CFX_Matrix* pObj2Device,
- CPDF_Font* pFont,
- FX_FLOAT font_size,
- const CFX_Matrix* pTextMatrix,
- bool bFill,
- bool bStroke);
- bool ProcessForm(const CPDF_FormObject* pFormObj,
- const CFX_Matrix* pObj2Device);
- CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj,
- const FX_RECT& rect,
- int& left,
- int& top,
- bool bBackAlphaRequired);
- CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict,
- FX_RECT* pClipRect,
- const CFX_Matrix* pMatrix);
- void Init(CPDF_RenderContext* pParent);
- static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont);
- static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj,
- bool bStroke);
- 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,
- bool bLogical,
- FX_RECT& rect) const;
- void GetScaledMatrix(CFX_Matrix& matrix) const;
-
- static const int kRenderMaxRecursionDepth = 64;
- static int s_CurrentRecursionDepth;
-
- CPDF_RenderContext* m_pContext;
- bool m_bStopped;
- CFX_RenderDevice* m_pDevice;
- CFX_Matrix m_DeviceMatrix;
- CPDF_ClipPath m_LastClipPath;
- const CPDF_PageObject* m_pCurObj;
- const CPDF_PageObject* m_pStopObj;
- CPDF_GraphicStates m_InitialStates;
- int m_HalftoneLimit;
- std::unique_ptr<CPDF_ImageRenderer> m_pImageRenderer;
- bool m_bPrint;
- int m_Transparency;
- bool m_bDropObjects;
- bool m_bStdCS;
- uint32_t m_GroupFamily;
- bool m_bLoadMask;
- CPDF_Type3Char* m_pType3Char;
- FX_ARGB m_T3FillColor;
- int m_curBlend;
-};
-
class CPDF_ImageLoader {
public:
CPDF_ImageLoader()