Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: core/include/fpdfapi/fpdf_render.h

Issue 1620523002: Change _PDF_RenderItem to CPDF_RenderContext::Layer. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Few more unused decls Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_render.h
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index b4178a7f864acaaa365b93070d6f38c64db51e56..2637dd3252aa3256bc007e4a2de40840953cc178 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 {
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698