From e647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 5 Jan 2017 12:57:00 -0800 Subject: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. We worry about cyclical references, but no leaks found. Review-Url: https://codereview.chromium.org/2609423003 --- xfa/fde/tto/fde_textout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fde/tto/fde_textout.h') diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h index 684a6411fa..f9eeb82ddc 100644 --- a/xfa/fde/tto/fde_textout.h +++ b/xfa/fde/tto/fde_textout.h @@ -79,7 +79,7 @@ class CFDE_TextOut : public CFX_Target { CFDE_TextOut(); ~CFDE_TextOut() override; - void SetFont(CFGAS_GEFont* pFont); + void SetFont(const CFX_RetainPtr& pFont); void SetFontSize(FX_FLOAT fFontSize); void SetTextColor(FX_ARGB color); void SetStyles(uint32_t dwStyles); @@ -153,7 +153,7 @@ class CFDE_TextOut : public CFX_Target { void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen); std::unique_ptr m_pTxtBreak; - CFGAS_GEFont* m_pFont; // not owned. + CFX_RetainPtr m_pFont; FX_FLOAT m_fFontSize; FX_FLOAT m_fLineSpace; FX_FLOAT m_fLinePos; -- cgit v1.2.3