aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD.gn
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-02-09 12:24:07 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 19:30:25 +0000
commita04bb45b23e201f317e6bddd41b3241df9f3ac2c (patch)
treef5bc7192e064749288b831ddda0baf1143dababc /BUILD.gn
parent67d64605d3421404a94c0717fdff194730579873 (diff)
Make src/effects explicitly optional.
This adds a GN argument to disable src/effects, which can cut about 1M off libskia. It's not the first place you'd go to trim code size, but after turning off easy big things like Ganesh, it starts looking big. I tested that fiddle builds and links. It uses Skia but not effects. Most of our test apps use effects and can't build in this new mode. Change-Id: I9b5d6e9289a87bc08eedf6d202d0eabe754da41a Reviewed-on: https://skia-review.googlesource.com/8263 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn11
1 files changed, 9 insertions, 2 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 656ed5e2b7..471b3fd2dc 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,6 +28,7 @@ declare_args() {
skia_android_serial = ""
skia_enable_android_framework_defines = false
skia_enable_discrete_gpu = true
+ skia_enable_effects = true
skia_enable_gpu = true
skia_enable_pdf = true
skia_enable_splicer = is_skia_standalone && sanitize != "MSAN" && !is_ios
@@ -322,6 +323,13 @@ template("optional") {
}
}
+optional("effects") {
+ enabled = skia_enable_effects
+ sources =
+ skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ]
+ sources_when_disabled = [ "src/ports/SkGlobalInitialization_none.cpp" ]
+}
+
optional("fontmgr_android") {
enabled = fontmgr_android_enabled
@@ -543,6 +551,7 @@ component("skia") {
":armv7",
":avx",
":crc32",
+ ":effects",
":fontmgr_android",
":fontmgr_custom",
":fontmgr_fontconfig",
@@ -571,7 +580,6 @@ component("skia") {
sources = []
sources += skia_core_sources
- sources += skia_effects_sources
sources += skia_sksl_sources
sources += skia_utils_sources
sources += skia_xps_sources
@@ -595,7 +603,6 @@ component("skia") {
"src/codec/SkWbmpCodec.cpp",
"src/images/SkImageEncoder.cpp",
"src/ports/SkDiscardableMemory_none.cpp",
- "src/ports/SkGlobalInitialization_default.cpp",
"src/ports/SkImageGenerator_skia.cpp",
"src/ports/SkMemory_malloc.cpp",
"src/ports/SkOSFile_stdio.cpp",