Make CCPR optional

This can reduce code size where CCPR is not supported (e.g. WebGL 1.0)

Drops 130k uncompressed, 50k compressed.

Bug: skia:
Change-Id: I8af7e681e1f3520a18e0c0d55e318dcf88206584
Reviewed-on: https://skia-review.googlesource.com/c/161041
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index acc3b9d..1931761 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -34,6 +34,7 @@
   skia_use_x11 = is_linux
 
   skia_android_serial = ""
+  skia_enable_ccpr = true
   skia_enable_discrete_gpu = true
   skia_enable_effects = true
   skia_enable_effects_imagefilters = true
@@ -587,6 +588,10 @@
   public_deps = []
 
   sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs
+  if (!skia_enable_ccpr) {
+    sources -= skia_ccpr_sources
+    sources += [ "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp" ]
+  }
 
   # These paths need to be absolute to match the ones produced by shared_sources.gni.
   sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ],