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 <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2020-06-09 09:22:23 -04:00 committed by Skia Commit-Bot
parent 9d79ac6b81
commit a01ec53bdd

View File

@ -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;