aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-07-13 15:50:03 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-14 18:54:24 +0000
commitf2c901474c240637c590ebfdf37db6e7d8316ec1 (patch)
tree4ffe68e36735c27ca28949acef3552255922e91f
parente94865e9347f50cbd6b8dd1b9ca165b42cdcdf02 (diff)
Add GN arg to allow Flutter-specific API guards
Bug: skia: Change-Id: I5a97da664626eebf30bba3f391fff0d8b9e62ea5 Reviewed-on: https://skia-review.googlesource.com/23042 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
-rw-r--r--BUILD.gn5
-rw-r--r--gn/flutter_defines.gni5
2 files changed, 10 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 4c34a1ef7c..f60c23b323 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("gn/flutter_defines.gni")
import("gn/shared_sources.gni")
if (is_fuchsia) {
@@ -34,6 +35,7 @@ declare_args() {
skia_android_serial = ""
skia_enable_discrete_gpu = true
skia_enable_effects = true
+ skia_enable_flutter_defines = false
skia_enable_gpu = true
skia_enable_pdf = true
skia_enable_spirv_validation = is_skia_dev_build && is_debug
@@ -112,6 +114,9 @@ config("skia_public") {
if (is_fuchsia || is_linux) {
defines += [ "SK_SAMPLES_FOR_X" ]
}
+ if (skia_enable_flutter_defines) {
+ defines += flutter_defines
+ }
if (!skia_enable_gpu) {
defines += [ "SK_SUPPORT_GPU=0" ]
}
diff --git a/gn/flutter_defines.gni b/gn/flutter_defines.gni
new file mode 100644
index 0000000000..75ac43d4fd
--- /dev/null
+++ b/gn/flutter_defines.gni
@@ -0,0 +1,5 @@
+# Copyright 2017 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+flutter_defines = [ "SK_SUPPORT_LEGACY_IMAGE_ENCODE_API" ]