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

Unified Diff: core/src/fxge/ge/fx_ge_font.cpp

Issue 801913002: Simplify PDFium by removing code that's not used in the open source repo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years 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: core/src/fxge/ge/fx_ge_font.cpp
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index 817f3712d94e00997109514e11e0ec3956d81c64..f9e1fe61dfb2daba7fe5e60184e35ee301d1ab69 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -32,18 +32,14 @@ CFX_Font::~CFX_Font()
delete m_pSubstFont;
m_pSubstFont = NULL;
}
-#ifdef FOXIT_CHROME_BUILD
if (m_pFontDataAllocation) {
FX_Free(m_pFontDataAllocation);
m_pFontDataAllocation = NULL;
}
-#endif
if (m_Face) {
-#ifdef FOXIT_CHROME_BUILD
if (FXFT_Get_Face_External_Stream(m_Face)) {
FXFT_Clear_Face_External_Stream(m_Face);
}
-#endif
if(m_bEmbedded) {
DeleteFace();
} else {
@@ -58,7 +54,7 @@ CFX_Font::~CFX_Font()
FX_Free(m_pGsubData);
m_pGsubData = NULL;
}
-#if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ && (!defined(_FPDFAPI_MINI_)))
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
ReleasePlatformResource();
#endif
}
@@ -183,7 +179,6 @@ static FXFT_Face FT_LoadFont(FX_LPBYTE pData, int size)
}
FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size)
{
-#ifdef FOXIT_CHROME_BUILD
m_pFontDataAllocation = FX_Alloc(FX_BYTE, size);
if (!m_pFontDataAllocation) {
return FALSE;
@@ -191,10 +186,6 @@ FX_BOOL CFX_Font::LoadEmbedded(FX_LPCBYTE data, FX_DWORD size)
FXSYS_memcpy32(m_pFontDataAllocation, data, size);
m_Face = FT_LoadFont((FX_LPBYTE)m_pFontDataAllocation, size);
m_pFontData = (FX_LPBYTE)m_pFontDataAllocation;
-#else
- m_Face = FT_LoadFont((FX_LPBYTE)data, size);
- m_pFontData = (FX_LPBYTE)data;
-#endif
m_bEmbedded = TRUE;
m_dwSize = size;
return m_Face != NULL;

Powered by Google App Engine
This is Rietveld 408576698