summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_type3cache.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-03 14:51:26 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-03 21:52:09 +0000
commit05e6a807311df5c3dfc4cafa56b85614f9bae6d3 (patch)
tree42abc36d38fe479e7b32c13b401c53cb3bd13be3 /core/fpdfapi/render/cpdf_type3cache.h
parent3a1d9b48cb5485cdb93f1cc9857e5d829868629c (diff)
downloadpdfium-05e6a807311df5c3dfc4cafa56b85614f9bae6d3.tar.xz
RefCount CPDF_Type3Cache all the time.chromium/3062
Prefer internal refcounts to external scheme. Change-Id: Ia99d5fc635a51a38f41b1d64ea44d8202685ddc7 Reviewed-on: https://pdfium-review.googlesource.com/3617 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_type3cache.h')
-rw-r--r--core/fpdfapi/render/cpdf_type3cache.h10
1 files changed, 7 insertions, 3 deletions
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 <map>
#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 <typename T, typename... Args>
+ friend CFX_RetainPtr<T> 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,