summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-17 13:41:13 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-17 13:41:13 -0800
commit979ddd8e4d331b330360f321b7b0c1acaead6445 (patch)
tree473af0a917597b08b66c4154cfd4c8e5fdd0a923 /core/include
parent1871821653de9f4b1706d726f4d318cf739e55af (diff)
downloadpdfium-979ddd8e4d331b330360f321b7b0c1acaead6445.tar.xz
Merge to XFA: Tidy CPDF_RenderContext
Original Review URL: https://codereview.chromium.org/1536623004 . (cherry picked from commit 761660c4074269ac806d06c9bef70e4e9fb0eb29) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1531423002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_render.h28
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h10
2 files changed, 13 insertions, 25 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;
};
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index 52be0dba0f..3934cfd6af 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -400,14 +400,14 @@ class CPDF_Annot : public CFX_PrivateData {
const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; }
CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; }
- FX_BOOL DrawAppearance(const CPDF_Page* pPage,
+ FX_BOOL DrawAppearance(CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
const CFX_Matrix* pUser2Device,
AppearanceMode mode,
const CPDF_RenderOptions* pOptions);
FX_BOOL DrawInContext(const CPDF_Page* pPage,
- const CPDF_RenderContext* pContext,
+ CPDF_RenderContext* pContext,
const CFX_Matrix* pUser2Device,
AppearanceMode mode);
@@ -431,7 +431,7 @@ class CPDF_AnnotList {
explicit CPDF_AnnotList(CPDF_Page* pPage);
~CPDF_AnnotList();
- void DisplayAnnots(const CPDF_Page* pPage,
+ void DisplayAnnots(CPDF_Page* pPage,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
CFX_Matrix* pMatrix,
@@ -440,7 +440,7 @@ class CPDF_AnnotList {
DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix,
bShowWidget ? 3 : 1, pOptions, nullptr);
}
- void DisplayAnnots(const CPDF_Page* pPage,
+ void DisplayAnnots(CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
@@ -454,7 +454,7 @@ class CPDF_AnnotList {
CPDF_Document* GetDocument() const { return m_pDocument; }
protected:
- void DisplayPass(const CPDF_Page* pPage,
+ void DisplayPass(CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,