Move dumpJSON behind the SK_ENABLE_DUMP_GPU flag
This should trim the code size of a WASM CanvasKit by 10-20KB.
Bug: skia:
Change-Id: Ibf0f8596c04e891e8f7cbc2fa4f1d1852f7cb462
Reviewed-on: https://skia-review.googlesource.com/c/159261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 886c275..acc3b9d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -121,6 +121,9 @@
}
if (skia_enable_flutter_defines) {
defines += flutter_defines
+
+ # Flutter always wants this https://github.com/flutter/flutter/issues/11402
+ defines += [ "SK_ENABLE_DUMP_GPU" ]
}
if (!skia_enable_gpu) {
defines += [ "SK_SUPPORT_GPU=0" ]
@@ -639,6 +642,10 @@
if (skia_enable_atlas_text) {
sources += skia_atlas_text_sources
}
+
+ if (is_debug) {
+ public_defines += [ "SK_ENABLE_DUMP_GPU" ]
+ }
}
optional("heif") {