[canvaskit] Slice out SkPicture
Removes about 120k uncompressed, 40k gzipped
Bug: skia:
Change-Id: I7e0b404f18fc3c6d4ff6b01d2c9bcd657b7d5e07
Reviewed-on: https://skia-review.googlesource.com/c/163246
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index b0e9191..37d22a6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -47,6 +47,7 @@
skia_enable_gpu = true
skia_enable_pdf = true
skia_enable_spirv_validation = is_skia_dev_build && is_debug
+ skia_enable_skpicture = true
skia_enable_tools = is_skia_dev_build
skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
skia_vulkan_header = "" # temporary as we remove the use from clients
@@ -383,6 +384,9 @@
skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ]
if (skia_enable_effects_imagefilters) {
sources += skia_effects_imagefilter_sources
+ if (!skia_enable_skpicture) {
+ sources -= [ "//src/effects/imagefilters/SkPictureImageFilter.cpp" ]
+ }
} else {
sources += [ "src/ports/SkGlobalInitialization_none_imagefilters.cpp" ]
}
@@ -903,6 +907,13 @@
"third_party/gif/SkGifImageReader.cpp",
]
+ defines = []
+ if (!skia_enable_skpicture) {
+ defines = [ "SK_DISABLE_SKPICTURE" ]
+ sources -= skia_skpicture_sources
+ sources += [ "src/core/SkPicture_none.cpp" ]
+ }
+
libs = []
if (is_win) {