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

Unified Diff: xfa/fde/tto/fde_textout.h

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 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
Index: xfa/fde/tto/fde_textout.h
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 684a6411faf73a4368536f7f0e0365473bf8e9e7..f9eeb82ddcbfa5befda9b58a7cec4ac6e8e0bd02 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<CFGAS_GEFont>& 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<CFX_TxtBreak> m_pTxtBreak;
- CFGAS_GEFont* m_pFont; // not owned.
+ CFX_RetainPtr<CFGAS_GEFont> m_pFont;
FX_FLOAT m_fFontSize;
FX_FLOAT m_fLineSpace;
FX_FLOAT m_fLinePos;

Powered by Google App Engine
This is Rietveld 408576698