Add a flag to disable mask-filtered mask caching for Chrome
This close to branching, I'm inclined to disable this for M70.
Here is the Chrome-side CL that sets the flag:
https://chromium-review.googlesource.com/c/chromium/src/+/1193968 (
Disable mask-filtered mask caching in Skia)
Bug: 878195
Change-Id: Ifaf92fac80b75431badb52e0e5b09ccc57c08d8e
Reviewed-on: https://skia-review.googlesource.com/150080
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 15bd128..7680b7d 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -298,8 +298,12 @@
// To prevent overloading the cache with entries during animations we limit the cache of masks
// to cases where the matrix preserves axis alignment.
+#ifdef SK_DISABLE_MASKFILTERED_MASK_CACHING
+ bool useCache = false;
+#else
bool useCache = !inverseFilled && viewMatrix.preservesAxisAlignment() &&
shape->hasUnstyledKey() && as_MFB(maskFilter)->asABlur(nullptr);
+#endif
const SkIRect* boundsForClip = &devClipBounds;
if (useCache) {