From a01ec53bddbde7b0d699e3ee09b90760b03d27fd Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 9 Jun 2020 09:22:23 -0400 Subject: [PATCH] Remove axis alignment restriction on small CPU blur Note that the calling code still won't cache the filtered mask if matrix does not preserve axis alignment. Change-Id: Ib11a7146e937e88b1968621ba49966e56beeb731 Bug: chromium:1087705 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295197 Reviewed-by: Robert Phillips Commit-Queue: Brian Salomon --- src/core/SkBlurMF.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/SkBlurMF.cpp b/src/core/SkBlurMF.cpp index 2fb4c9fe5a..8b2b544aa4 100644 --- a/src/core/SkBlurMF.cpp +++ b/src/core/SkBlurMF.cpp @@ -853,15 +853,13 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const GrStyledShape& shape, } // We prefer to blur paths with small blur radii on the CPU. - if (ctm.rectStaysRect()) { - static const SkScalar kMIN_GPU_BLUR_SIZE = SkIntToScalar(64); - static const SkScalar kMIN_GPU_BLUR_SIGMA = SkIntToScalar(32); + static const SkScalar kMIN_GPU_BLUR_SIZE = SkIntToScalar(64); + static const SkScalar kMIN_GPU_BLUR_SIGMA = SkIntToScalar(32); - if (devSpaceShapeBounds.width() <= kMIN_GPU_BLUR_SIZE && - devSpaceShapeBounds.height() <= kMIN_GPU_BLUR_SIZE && - xformedSigma <= kMIN_GPU_BLUR_SIGMA) { - return false; - } + if (devSpaceShapeBounds.width() <= kMIN_GPU_BLUR_SIZE && + devSpaceShapeBounds.height() <= kMIN_GPU_BLUR_SIZE && + xformedSigma <= kMIN_GPU_BLUR_SIGMA) { + return false; } return true;