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/src/gpu/gl/GrGLExtensions.cpp b/src/gpu/gl/GrGLExtensions.cpp
index b6898c4..d0b7162 100644
--- a/src/gpu/gl/GrGLExtensions.cpp
+++ b/src/gpu/gl/GrGLExtensions.cpp
@@ -151,6 +151,7 @@
     }
 }
 
+#ifdef SK_ENABLE_DUMP_GPU
 void GrGLExtensions::dumpJSON(SkJSONWriter* writer) const {
     writer->beginArray();
     for (int i = 0; i < fStrings.count(); ++i) {
@@ -158,3 +159,6 @@
     }
     writer->endArray();
 }
+#else
+void GrGLExtensions::dumpJSON(SkJSONWriter* writer) const { }
+#endif