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/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp
new file mode 100644
index 0000000..ebc12da
--- /dev/null
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrCoverageCountingPathRenderer.h"
+
+bool GrCoverageCountingPathRenderer::IsSupported(const GrCaps& caps) {
+ return false;
+}
+
+sk_sp<GrCoverageCountingPathRenderer> GrCoverageCountingPathRenderer::CreateIfSupported(
+ const GrCaps& caps, AllowCaching allowCaching) {
+ return nullptr;
+}
+
+std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor(
+ uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect, int rtWidth,
+ int rtHeight, const GrCaps& caps) {
+ return nullptr;
+}