summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_render.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-17 13:35:22 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-17 13:35:22 -0800
commit761660c4074269ac806d06c9bef70e4e9fb0eb29 (patch)
tree6ba6709f676261367161ab717f2dfe44eac89103 /core/include/fpdfapi/fpdf_render.h
parent0a9158b99a2002fb82301ebec20dbc23b3fc084c (diff)
downloadpdfium-761660c4074269ac806d06c9bef70e4e9fb0eb29.tar.xz
Tidy CPDF_RenderContext
- Remove unused Clear() method. - Replace Create() with actual ctors. - Avoid const casts. - Protect members. - Add missing const in adjacent code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1536623004 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_render.h')
-rw-r--r--core/include/fpdfapi/fpdf_render.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index d7fdbd463d..2460849543 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -80,19 +80,10 @@ class CPDF_RenderOptions {
};
class CPDF_RenderContext {
public:
- CPDF_RenderContext();
-
- void Create(CPDF_Page* pPage, FX_BOOL bFirstLayer = TRUE);
-
- void Create(CPDF_Document* pDoc = NULL,
- CPDF_PageRenderCache* pPageCache = NULL,
- CPDF_Dictionary* pPageResources = NULL,
- FX_BOOL bFirstLayer = TRUE);
-
+ explicit CPDF_RenderContext(CPDF_Page* pPage);
+ CPDF_RenderContext(CPDF_Document* pDoc, CPDF_PageRenderCache* pPageCache);
~CPDF_RenderContext();
- void Clear();
-
void AppendObjectList(CPDF_PageObjects* pObjs,
const CFX_Matrix* pObject2Device);
@@ -112,21 +103,18 @@ class CPDF_RenderContext {
CPDF_PageRenderCache* GetPageCache() const { return m_pPageCache; }
- CPDF_Document* m_pDocument;
+ 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;
-
- protected:
CFX_ArrayTemplate<struct _PDF_RenderItem> m_ContentList;
-
FX_BOOL m_bFirstLayer;
- void Render(CFX_RenderDevice* pDevice,
- const CPDF_PageObject* pStopObj,
- const CPDF_RenderOptions* pOptions,
- const CFX_Matrix* pFinalMatrix);
friend class CPDF_RenderStatus;
friend class CPDF_ProgressiveRenderer;
};