From e8d3691c82d1be805ffdce3329d00313af7ce0ab Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Jun 2015 15:09:45 -0700 Subject: Replace CFX_MapPtrTemplate with std::map. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1181593003. --- core/src/fpdfapi/fpdf_render/render_int.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'core/src/fpdfapi/fpdf_render/render_int.h') diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h index 7aa8358b8d..77acb15902 100644 --- a/core/src/fpdfapi/fpdf_render/render_int.h +++ b/core/src/fpdfapi/fpdf_render/render_int.h @@ -7,6 +7,8 @@ #ifndef CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ #define CORE_SRC_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ +#include + #include "../../../../third_party/base/nonstd_unique_ptr.h" #include "../../../include/fpdfapi/fpdf_pageobj.h" @@ -52,14 +54,12 @@ public: CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc); FX_COLORREF TranslateColor(FX_COLORREF src); }; -typedef CFX_MapPtrTemplate*> CPDF_Type3CacheMap; -typedef CFX_MapPtrTemplate*> CPDF_TransferFuncMap; + class CPDF_DocRenderData { public: CPDF_DocRenderData(CPDF_Document* pPDFDoc = NULL); ~CPDF_DocRenderData(); - FX_BOOL Initialize(); CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); CFX_FontCache* GetFontCache() @@ -70,10 +70,15 @@ public: void ReleaseCachedType3(CPDF_Type3Font* pFont); void ReleaseTransferFunc(CPDF_Object* pObj); private: - CPDF_Document* m_pPDFDoc; - CFX_FontCache* m_pFontCache; - CPDF_Type3CacheMap m_Type3FaceMap; - CPDF_TransferFuncMap m_TransferFuncMap; + using CPDF_Type3CacheMap = + std::map*>; + using CPDF_TransferFuncMap = + std::map*> ; + + CPDF_Document* m_pPDFDoc; + CFX_FontCache* m_pFontCache; + CPDF_Type3CacheMap m_Type3FaceMap; + CPDF_TransferFuncMap m_TransferFuncMap; }; struct _PDF_RenderItem { public: -- cgit v1.2.3