diff options
author | tsepez <tsepez@chromium.org> | 2016-07-25 13:40:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-25 13:40:11 -0700 |
commit | 22b05fc0f0cbfd3841b0963b577719fd16725081 (patch) | |
tree | 1c4024e32150ada8d6963d82daf4be824d411580 | |
parent | 3e805789a3855007018f8463797a4f9fdb19838d (diff) | |
download | pdfium-22b05fc0f0cbfd3841b0963b577719fd16725081.tar.xz |
Remove FX_FONTCACHE_DEFINE
This macro isn't buying us anything and reduces transparency.
Review-Url: https://codereview.chromium.org/2179953002
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 2 | ||||
-rw-r--r-- | core/fxge/ge/fx_ge_text.cpp | 4 | ||||
-rw-r--r-- | core/fxge/include/fx_font.h | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index d8d416dd39..cc9c751b32 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -764,7 +764,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj, pCache = CFX_GEModule::Get()->GetFontCache(); } CFX_FaceCache* pFaceCache = pCache->GetCachedFace(&pFont->m_Font); - FX_FONTCACHE_DEFINE(pCache, &pFont->m_Font); + CFX_AutoFontCache autoFontCache(pCache, &pFont->m_Font); CPDF_CharPosList CharPosList; CharPosList.Load(textobj->m_nChars, textobj->m_pCharCodes, textobj->m_pCharPos, pFont, font_size); diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index db86d65067..c97b88e27b 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -479,7 +479,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, pCache = CFX_GEModule::Get()->GetFontCache(); CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); - FX_FONTCACHE_DEFINE(pCache, pFont); + CFX_AutoFontCache autoFontCache(pCache, pFont); std::vector<FXTEXT_GLYPHPOS> glyphs(nChars); CFX_Matrix matrixCTM = GetCTM(); FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); @@ -634,7 +634,7 @@ FX_BOOL CFX_RenderDevice::DrawTextPathWithFlags( pCache = CFX_GEModule::Get()->GetFontCache(); CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); - FX_FONTCACHE_DEFINE(pCache, pFont); + CFX_AutoFontCache autoFontCache(pCache, pFont); for (int iChar = 0; iChar < nChars; iChar++) { const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; CFX_Matrix matrix; diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h index 9b43f16710..817a9d12ee 100644 --- a/core/fxge/include/fx_font.h +++ b/core/fxge/include/fx_font.h @@ -504,8 +504,6 @@ class CFX_AutoFontCache { CFX_Font* m_pFont; }; -#define FX_FONTCACHE_DEFINE(pFontCache, pFont) \ - CFX_AutoFontCache autoFontCache((pFontCache), (pFont)) class CFX_GlyphBitmap { public: int m_Top; |