diff options
author | John Abd-El-Malek <jam@chromium.org> | 2015-02-02 16:52:07 -0800 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2015-02-02 16:52:07 -0800 |
commit | ef4dce44bb4b990f301a98853075f501c6f053d7 (patch) | |
tree | 006cd513695df7d324fce1fd1b4a58af3902d799 /core/src | |
parent | 3795a748bb3fb7fc3f2c6196af1f89627ac37f4e (diff) | |
download | pdfium-ef4dce44bb4b990f301a98853075f501c6f053d7.tar.xz |
Merge the following changes to XFA branch:
b3a788e Fix GN PDFium build when building all. by John Abd-El-Malek - 19 hours ago chromium/2293
f8af677 Always use the FreeType headers included in PDFium. by John Abd-El-Malek - 24 hours ago
dc8c950 Don't export any OpenJPEG methods from PDFium. by John Abd-El-Malek - 3 days ago
71c24b8 Use system FreeType on Linux. by John Abd-El-Malek - 3 days ago
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/900433002
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h | 24 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_text.cpp | 14 |
2 files changed, 1 insertions, 37 deletions
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h index 988db72009..b1e1c294c8 100644 --- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h +++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h @@ -76,32 +76,10 @@ Most compilers implement their own version of this keyword ... #define OPJ_DEPRECATED(func) func #endif -#if defined(OPJ_STATIC) || !defined(_WIN32) -/* http://gcc.gnu.org/wiki/Visibility */ -#if __GNUC__ >= 4 -#define OPJ_API __attribute__ ((visibility ("default"))) -#define OPJ_LOCAL __attribute__ ((visibility ("hidden"))) -#else +// PDFium doesn't need to export any of these methods. #define OPJ_API #define OPJ_LOCAL -#endif #define OPJ_CALLCONV -#else -#define OPJ_CALLCONV __stdcall -/* -The following ifdef block is the standard way of creating macros which make exporting -from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS -symbol defined on the command line. this symbol should not be defined on any project -that uses this DLL. This way any other project whose source files include this file see -OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols -defined with this macro as being exported. -*/ -#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) -#define OPJ_API __declspec(dllexport) -#else -#define OPJ_API __declspec(dllimport) -#endif /* OPJ_EXPORTS */ -#endif /* !OPJ_STATIC || !_WIN32 */ typedef int OPJ_BOOL; #define OPJ_TRUE 1 diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index 0724c10edf..59bd351822 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -1328,12 +1328,10 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde pFont->AdjustMMParams(glyph_index, dest_width, pFont->GetSubstFont()->m_Weight); } } - int transflag = FXFT_Get_Face_Internal_Flag(m_Face); FXFT_Set_Transform(m_Face, &ft_matrix, 0); int load_flags = (m_Face->face_flags & FT_FACE_FLAG_SFNT) ? FXFT_LOAD_NO_BITMAP : (FXFT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING); int error = FXFT_Load_Glyph(m_Face, glyph_index, load_flags); if (error) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } int weight = 0; @@ -1345,7 +1343,6 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde if (pSubstFont && !(pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) && weight > 400) { int index = (weight - 400) / 10; if (index >= WEIGHTPOW_ARRAY_SIZE) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } int level = 0; @@ -1359,13 +1356,11 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary, FT_LCD_FILTER_DEFAULT); error = FXFT_Render_Glyph(m_Face, anti_alias); if (error) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face)); int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face)); if (bmwidth > 2048 || bmheight > 2048) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } int dib_width = bmwidth; @@ -1402,7 +1397,6 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde _GammaAdjust(pDestBuf, bmwidth, bmheight, dest_pitch, CFX_GEModule::Get()->GetTextGammaTable()); } } - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return pGlyphBitmap; } FX_BOOL _OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, @@ -1444,7 +1438,6 @@ FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, } FXFT_Face face = pFont->GetFace(); FXFT_Select_Charmap(pFont->m_Face, FXFT_ENCODING_UNICODE); - int transflag = FXFT_Get_Face_Internal_Flag(pFont->m_Face); if (pText_matrix) { FXFT_Matrix ft_matrix; ft_matrix.xx = (signed long)(pText_matrix->a / 64 * 65536); @@ -1472,7 +1465,6 @@ FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size, glyph_index, argb); x_pos += (FX_FLOAT)w / em; } - FXFT_Set_Face_Internal_Flag(pFont->m_Face, transflag); return TRUE; } FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, @@ -1489,11 +1481,9 @@ FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size, ft_matrix.xy = ft_matrix.yx = 0; ft_matrix.yy = (signed long)(font_size / 64 * 65536); } - int transflag = FXFT_Get_Face_Internal_Flag(pFont->m_Face); FXFT_Set_Transform(pFont->m_Face, &ft_matrix, 0); FX_BOOL ret = _OutputGlyph(dib, x, y, pFont, glyph_index, argb); - FXFT_Set_Face_Internal_Flag(pFont->m_Face, transflag); return ret; } const CFX_PathData* CFX_FaceCache::LoadGlyphPath(CFX_Font* pFont, FX_DWORD glyph_index, int dest_width) @@ -1640,12 +1630,10 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width) AdjustMMParams(glyph_index, dest_width, m_pSubstFont->m_Weight); } } - int transflag = FXFT_Get_Face_Internal_Flag(m_Face); FXFT_Set_Transform(m_Face, &ft_matrix, 0); int load_flags = (m_Face->face_flags & FT_FACE_FLAG_SFNT) ? FXFT_LOAD_NO_BITMAP : FXFT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING; int error = FXFT_Load_Glyph(m_Face, glyph_index, load_flags); if (error) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } if (m_pSubstFont && !(m_pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) && m_pSubstFont->m_Weight > 400) { @@ -1672,7 +1660,6 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width) params.m_PointCount = 0; FXFT_Outline_Decompose(FXFT_Get_Glyph_Outline(m_Face), &funcs, ¶ms); if (params.m_PointCount == 0) { - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return NULL; } CFX_PathData* pPath = FX_NEW CFX_PathData; @@ -1691,7 +1678,6 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width) if (params.m_PointCount) { pPath->GetPoints()[params.m_PointCount - 1].m_Flag |= FXPT_CLOSEFIGURE; } - FXFT_Set_Face_Internal_Flag(m_Face, transflag); return pPath; } void _CFX_UniqueKeyGen::Generate(int count, ...) |