summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-22 12:00:56 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-22 12:00:56 -0800
commitd5712ac571f3487fe3f74617fdab007a11a09052 (patch)
tree795c2525125d032988854ca76fc0fca76ca07299 /core/include
parent9ebc84109d7d2f7b81f06f19e5db20888e026c3b (diff)
downloadpdfium-d5712ac571f3487fe3f74617fdab007a11a09052.tar.xz
Change _PDF_RenderItem to CPDF_RenderContext::Layer.
The _CAPS class naming convention violates reserved identifier rules. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1620523002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_render.h52
1 files changed, 23 insertions, 29 deletions
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index b4178a7f86..2637dd3252 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -20,8 +20,6 @@ class CPDF_FormObject;
class CPDF_ImageCacheEntry;
class CPDF_ImageObject;
class CPDF_PathObject;
-class CPDF_RenderContext;
-class CPDF_RenderOptions;
class CPDF_RenderStatus;
class CPDF_ShadingObject;
class CPDF_TextObject;
@@ -55,69 +53,65 @@ class IPDF_OCContext {
#define RENDER_NOPATHSMOOTH 0x20000000
#define RENDER_NOIMAGESMOOTH 0x40000000
#define RENDER_LIMITEDIMAGECACHE 0x80000000
+
class CPDF_RenderOptions {
public:
CPDF_RenderOptions();
+ FX_ARGB TranslateColor(FX_ARGB argb) const;
int m_ColorMode;
-
FX_COLORREF m_BackColor;
-
FX_COLORREF m_ForeColor;
-
FX_DWORD m_Flags;
-
int m_Interpolation;
-
FX_DWORD m_AddFlags;
-
IPDF_OCContext* m_pOCContext;
-
FX_DWORD m_dwLimitCacheSize;
-
int m_HalftoneLimit;
-
- FX_ARGB TranslateColor(FX_ARGB argb) const;
};
+
class CPDF_RenderContext {
public:
+ class Layer {
+ public:
+ CPDF_PageObjectList* m_pObjectList;
+ CFX_Matrix m_Matrix;
+ };
+
explicit CPDF_RenderContext(CPDF_Page* pPage);
CPDF_RenderContext(CPDF_Document* pDoc, CPDF_PageRenderCache* pPageCache);
~CPDF_RenderContext();
- void AppendObjectList(CPDF_PageObjectList* pObjs,
- const CFX_Matrix* pObject2Device);
+ void AppendLayer(CPDF_PageObjectList* pObjectList,
+ const CFX_Matrix* pObject2Device);
void Render(CFX_RenderDevice* pDevice,
- const CPDF_RenderOptions* pOptions = NULL,
- const CFX_Matrix* pFinalMatrix = NULL);
+ const CPDF_RenderOptions* pOptions,
+ const CFX_Matrix* pFinalMatrix);
- void DrawObjectList(CFX_RenderDevice* pDevice,
- CPDF_PageObjectList* pObjs,
- const CFX_Matrix* pObject2Device,
- const CPDF_RenderOptions* pOptions);
+ void Render(CFX_RenderDevice* pDevice,
+ const CPDF_PageObject* pStopObj,
+ const CPDF_RenderOptions* pOptions,
+ const CFX_Matrix* pFinalMatrix);
void GetBackground(CFX_DIBitmap* pBuffer,
const CPDF_PageObject* pObj,
const CPDF_RenderOptions* pOptions,
CFX_Matrix* pFinalMatrix);
+ FX_DWORD CountLayers() const { return m_Layers.GetSize(); }
+ Layer* GetLayer(FX_DWORD index) { return m_Layers.GetDataPtr(index); }
+
+ CPDF_Document* GetDocument() const { return m_pDocument; }
+ CPDF_Dictionary* GetPageResources() const { return m_pPageResources; }
CPDF_PageRenderCache* GetPageCache() const { return m_pPageCache; }
protected:
- void Render(CFX_RenderDevice* pDevice,
- const CPDF_PageObject* pStopObj,
- const CPDF_RenderOptions* pOptions,
- const CFX_Matrix* pFinalMatrix);
-
CPDF_Document* const m_pDocument;
CPDF_Dictionary* m_pPageResources;
CPDF_PageRenderCache* m_pPageCache;
- CFX_ArrayTemplate<struct _PDF_RenderItem> m_ContentList;
FX_BOOL m_bFirstLayer;
-
- friend class CPDF_RenderStatus;
- friend class CPDF_ProgressiveRenderer;
+ CFX_ArrayTemplate<Layer> m_Layers;
};
class CPDF_ProgressiveRenderer {