From 05e6a807311df5c3dfc4cafa56b85614f9bae6d3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 3 Apr 2017 14:51:26 -0700 Subject: RefCount CPDF_Type3Cache all the time. Prefer internal refcounts to external scheme. Change-Id: Ia99d5fc635a51a38f41b1d64ea44d8202685ddc7 Reviewed-on: https://pdfium-review.googlesource.com/3617 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fpdfapi/render/cpdf_type3cache.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/render/cpdf_type3cache.h') diff --git a/core/fpdfapi/render/cpdf_type3cache.h b/core/fpdfapi/render/cpdf_type3cache.h index f03578650b..0b3cdcbfa4 100644 --- a/core/fpdfapi/render/cpdf_type3cache.h +++ b/core/fpdfapi/render/cpdf_type3cache.h @@ -10,16 +10,17 @@ #include #include "core/fpdfapi/font/cpdf_type3font.h" +#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" class CPDF_Type3Glyphs; -class CPDF_Type3Cache { +class CPDF_Type3Cache : public CFX_Retainable { public: - explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); - ~CPDF_Type3Cache(); + template + friend CFX_RetainPtr pdfium::MakeRetain(Args&&... args); CFX_GlyphBitmap* LoadGlyph(uint32_t charcode, const CFX_Matrix* pMatrix, @@ -27,6 +28,9 @@ class CPDF_Type3Cache { float retinaScaleY); private: + explicit CPDF_Type3Cache(CPDF_Type3Font* pFont); + ~CPDF_Type3Cache() override; + CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize, uint32_t charcode, const CFX_Matrix* pMatrix, -- cgit v1.2.3