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

Unified Diff: xfa/fgas/layout/fgas_textbreak.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/fgas/layout/fgas_textbreak.h
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 7bae6cd46e429d1dc887a440dacd94627d6bb4e2..36602749c77a949f404b8c6d51ff512b01e47bc9 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -93,7 +93,7 @@ struct FX_TXTRUN {
CFX_WideString wsStr;
int32_t* pWidths;
int32_t iLength;
- CFGAS_GEFont* pFont;
+ CFX_RetainPtr<CFGAS_GEFont> pFont;
FX_FLOAT fFontSize;
uint32_t dwStyles;
int32_t iHorizontalScale;
@@ -206,7 +206,7 @@ class CFX_TxtBreak {
void SetLinePos(FX_FLOAT fLinePos);
uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
void SetLayoutStyles(uint32_t dwLayoutStyles);
- void SetFont(CFGAS_GEFont* pFont);
+ void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant);
void SetDefaultChar(FX_WCHAR wch);
@@ -280,7 +280,7 @@ class CFX_TxtBreak {
bool m_bCombText;
int32_t m_iArabicContext;
int32_t m_iCurArabicContext;
- CFGAS_GEFont* m_pFont;
+ CFX_RetainPtr<CFGAS_GEFont> m_pFont;
int32_t m_iFontSize;
bool m_bEquidistant;
int32_t m_iTabWidth;

Powered by Google App Engine
This is Rietveld 408576698