summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-22 12:06:32 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-22 12:06:32 -0800
commit71fdc34b71760735aa0c14c820a1a10eb1e5829a (patch)
tree03424565134e2dd7adb29a23a15324600b764b57 /core/include
parent8139bc147f6936d490d2e47632213ec13251e925 (diff)
downloadpdfium-71fdc34b71760735aa0c14c820a1a10eb1e5829a.tar.xz
Merge to XFA: Change _PDF_RenderItem to CPDF_RenderContext::Layer.
Original Review URL: https://codereview.chromium.org/1620523002 . (cherry picked from commit d5712ac571f3487fe3f74617fdab007a11a09052) TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1624553004 .
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 {