Add skia GL-only build constructs.
This is the equivalent of https://crrev.com/714590
Change-Id: If107049931d19412514976dc9067b1847a9a7f95
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63251
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index fb0573e..041062d 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -7,6 +7,7 @@
import("//testing/test.gni")
import("//third_party/skia/gn/shared_sources.gni")
import("//third_party/skia/third_party/skcms/skcms.gni")
+import("features.gni")
if (current_cpu == "arm") {
import("//build/config/arm.gni")
@@ -16,7 +17,7 @@
}
skia_support_gpu = !is_ios
-skia_support_pdf = false #!is_ios && (enable_basic_printing || enable_print_preview)
+skia_support_pdf = false
# External-facing config for dependent code.
config("skia_config") {
@@ -41,6 +42,10 @@
defines += [ "SK_SUPPORT_GPU=0" ]
}
+ if (skia_use_gl) {
+ defines += [ "SK_GL" ]
+ }
+
if (is_android) {
defines += [
"SK_BUILD_FOR_ANDROID",
@@ -216,6 +221,9 @@
if (skia_support_gpu) {
sources += skia_gpu_sources
sources += skia_null_gpu_sources
+ if (skia_use_gl) {
+ sources += skia_gl_gpu_sources
+ }
}
# Remove unused util files include in utils.gni
diff --git a/skia/features.gni b/skia/features.gni
new file mode 100644
index 0000000..47771d1
--- /dev/null
+++ b/skia/features.gni
@@ -0,0 +1,9 @@
+# Copyright 2019 The PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+declare_args() {
+ # Enable experimental SkiaRenderer Dawn backend.
+ skia_use_dawn = false
+ skia_use_gl = true
+}