diff options
-rw-r--r-- | expectations/gm/ignored-tests.txt | 4 | ||||
-rw-r--r-- | src/effects/SkBlurMaskFilter.cpp | 5 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 7 |
3 files changed, 10 insertions, 6 deletions
diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt index 4e5f56cf40..612695382f 100644 --- a/expectations/gm/ignored-tests.txt +++ b/expectations/gm/ignored-tests.txt @@ -34,7 +34,9 @@ #gradtext_gpu # Added for skbug.com/1998 by bsalomon. Will require rebaselining when changes are complete. -bleed +bleed_gpu +blurrects_gpu +simpleblurroundrect_gpu # Added by sugoi for added test in https://codereview.chromium.org/104853005 displacement diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index f4d032f08f..fa31743bb3 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -541,7 +541,7 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRect& srcBounds, } bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, - const SkMatrix& matrix, + const SkMatrix& ctm, const SkRect& maskRect, GrTexture** result, bool canOverwriteSrc) const { @@ -551,8 +551,7 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, GrContext::AutoWideOpenIdentityDraw awo(context, NULL); - // FIXME: This isn't the right matrix. - SkScalar xformedSigma = this->computeXformedSigma(context->getMatrix()); + SkScalar xformedSigma = this->computeXformedSigma(ctm); SkASSERT(xformedSigma > 0); // If we're doing a normal blur, we can clobber the pathTexture in the diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 39f9ef3d7c..36e76e9940 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -922,6 +922,10 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, draw.fClip->getBounds(), fContext->getMatrix(), &maskRect)) { + // The context's matrix may change while creating the mask, so save the CTM here to + // pass to filterMaskGPU. + const SkMatrix ctm = fContext->getMatrix(); + SkIRect finalIRect; maskRect.roundOut(&finalIRect); if (draw.fClip->quickReject(finalIRect)) { @@ -940,8 +944,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, GrTexture* filtered; if (paint.getMaskFilter()->filterMaskGPU(mask.texture(), - fContext->getMatrix(), maskRect, - &filtered, true)) { + ctm, maskRect, &filtered, true)) { // filterMaskGPU gives us ownership of a ref to the result SkAutoTUnref<GrTexture> atu(filtered); |