summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--build_overrides/pdfium.gni3
-rw-r--r--pdfium.gni3
-rw-r--r--pdfium.gyp4
4 files changed, 14 insertions, 0 deletions
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"', {