From 8b301624917aae9f7b7b26e6d275c9ae9cd80cfe Mon Sep 17 00:00:00 2001 From: caryclark Date: Thu, 21 Jul 2016 06:12:33 -0700 Subject: Bring pdfium file in sync with chrome, fix mac build This permits PDFium to build on the Mac with Skia as the backend. It builds on Linux and Windows as well. R=dsinclair@chromium.org,bungeman@google.com Review-Url: https://codereview.chromium.org/1995003002 --- BUILD.gn | 2 +- DEPS | 2 +- core/fxge/ge/fx_ge_font.cpp | 2 +- core/fxge/ge/fx_ge_text.cpp | 2 +- skia/BUILD.gn | 6 +----- skia/skia_gn_files.gypi | 1 - skia/skia_library.gypi | 1 - 7 files changed, 5 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 5426860f90..f622f05548 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -662,7 +662,6 @@ static_library("fxge") { "core/fxge/android/fx_android_font.h", "core/fxge/android/fx_android_imp.cpp", "core/fxge/apple/apple_int.h", - "core/fxge/apple/fx_apple_platform.cpp", "core/fxge/apple/fx_mac_imp.cpp", "core/fxge/apple/fx_quartz_device.cpp", "core/fxge/dib/dib_int.h", @@ -721,6 +720,7 @@ static_library("fxge") { sources += [ "core/fxge/agg/fx_agg_driver.cpp", "core/fxge/agg/fx_agg_driver.h", + "core/fxge/apple/fx_apple_platform.cpp", ] deps = [ "third_party:fx_agg", diff --git a/DEPS b/DEPS index 771aac0bf4..1f263b8db3 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ vars = { 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038', 'icu_revision': 'a5f86adbb0a58d04c035a5d1228747b1823cd485', 'pdfium_tests_revision': 'd307839b3d4c8e521208172155718c945af696e0', - 'skia_revision': '7942f22c607caf826a6a609b89338a569d0a30e7', + 'skia_revision': '7d46f4af7dc759002537a172af121f2bfe200981', 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d', 'trace_event_revision': '54b8455be9505c2cb0cf5c26bb86739c236471aa', 'v8_revision': '75f10f91b1b0b392d2a29a7a480bf079db6f43fa', diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp index fd6f8a2cf8..bd0bb0e3e5 100644 --- a/core/fxge/ge/fx_ge_font.cpp +++ b/core/fxge/ge/fx_ge_font.cpp @@ -118,7 +118,7 @@ CFX_Font::~CFX_Font() { FX_Free(m_pOwnedStream); #endif // PDF_ENABLE_XFA FX_Free(m_pGsubData); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ && !defined _SKIA_SUPPORT_ ReleasePlatformResource(); #endif } diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index 1a0c14e0db..db86d65067 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -851,7 +851,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, } #endif CFX_ByteString FaceGlyphsKey(keygen.m_Key, keygen.m_KeyLen); -#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ +#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ return LookUpGlyphBitmap(pFont, pMatrix, FaceGlyphsKey, glyph_index, bFontStyle, dest_width, anti_alias); #else diff --git a/skia/BUILD.gn b/skia/BUILD.gn index c5c2796f9c..01acf58dcf 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn @@ -330,11 +330,7 @@ component("skia") { "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp", ] } - if (!is_mac) { - sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ] - } - - if (!is_linux && !is_android && !is_win) { + if (!is_linux && !is_android && !is_win && !is_mac) { sources -= [ "//third_party/skia/src/ports/SkFontHost_FreeType.cpp", "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp", diff --git a/skia/skia_gn_files.gypi b/skia/skia_gn_files.gypi index 062460b1c6..a3aca21014 100644 --- a/skia/skia_gn_files.gypi +++ b/skia/skia_gn_files.gypi @@ -9,7 +9,6 @@ '<(skia_src_path)/fonts/SkRemotableFontMgr.cpp', '<(skia_src_path)/ports/SkFontHost_FreeType_common.cpp', '<(skia_src_path)/ports/SkFontHost_FreeType.cpp', - '<(skia_src_path)/ports/SkFontHost_mac.cpp', '<(skia_src_path)/ports/SkFontHost_win.cpp', '<(skia_src_path)/ports/SkFontMgr_android.cpp', '<(skia_src_path)/ports/SkFontMgr_android_factory.cpp', diff --git a/skia/skia_library.gypi b/skia/skia_library.gypi index 5757be226c..e933732410 100644 --- a/skia/skia_library.gypi +++ b/skia/skia_library.gypi @@ -41,7 +41,6 @@ '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', - '../third_party/skia/src/ports/SkFontHost_mac.cpp', '../third_party/skia/src/ports/SkFontHost_win.cpp', "../third_party/skia/src/ports/SkFontMgr_android.cpp", "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp", -- cgit v1.2.3