From 3e454bfb00089eb022ee0b09e1631dbd61e324c4 Mon Sep 17 00:00:00 2001 From: thestig Date: Fri, 29 Jul 2016 16:29:04 -0700 Subject: Add build configuration for experimental Windows GDI code. BUG=409472 Review-Url: https://codereview.chromium.org/2193783002 --- BUILD.gn | 4 ++++ build_overrides/pdfium.gni | 3 +++ pdfium.gni | 3 +++ pdfium.gyp | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 872baf7785..f7a6007e0c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -30,6 +30,10 @@ config("pdfium_common_config") { if (pdf_enable_xfa) { defines += [ "PDF_ENABLE_XFA" ] } + + if (pdf_use_win32_gdi) { + defines += [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] + } } config("pdfium_core_config") { diff --git a/build_overrides/pdfium.gni b/build_overrides/pdfium.gni index 246671bb62..f3cddb758b 100644 --- a/build_overrides/pdfium.gni +++ b/build_overrides/pdfium.gni @@ -12,3 +12,6 @@ pdf_enable_xfa_override = false # Build PDFium against skia (experimental) rather than agg. pdf_use_skia_override = false + +# Build PDFium either with or without experimental win32 GDI APIs. +pdf_use_win32_gdi_override = false diff --git a/pdfium.gni b/pdfium.gni index 9e20f96bf7..ede452ff1a 100644 --- a/pdfium.gni +++ b/pdfium.gni @@ -20,6 +20,9 @@ declare_args() { # Build PDFium against skia (experimental) rather than agg. pdf_use_skia = pdf_use_skia_override + # Build PDFium with or without experimental win32 GDI APIs. + pdf_use_win32_gdi = pdf_use_win32_gdi_override + # Build PDFium standalone pdf_is_standalone = false } diff --git a/pdfium.gyp b/pdfium.gyp index 3a3c71e79c..fe2d176318 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -8,6 +8,7 @@ 'pdf_use_skia%': 0, 'pdf_enable_v8%': 1, 'pdf_enable_xfa%': 0, # Set to 1 by standalone.gypi in a standalone build. + 'pdf_use_win32_gdi%': 0, 'variables': { 'clang_use_chrome_plugins': 1, }, @@ -44,6 +45,9 @@ ['pdf_enable_xfa==1', { 'defines': ['PDF_ENABLE_XFA'], }], + ['pdf_use_win32_gdi==1', { + 'defines': ['PDFIUM_PRINT_TEXT_WITH_GDI'], + }], ['OS=="linux"', { 'conditions': [ ['target_arch=="x64"', { -- cgit v1.2.3