Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 1968603003: Swap SkGpuBlurUtils over to using SkIRects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkGpuBlurUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index a2d67d74af7b95344ef5d122decf0bfe22ced499..7f076d6ca5eacc65f79dfc4d327f4544cfba41cb 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -66,7 +66,7 @@ public:
const SkRRect& rrect) const override;
bool filterMaskGPU(GrTexture* src,
const SkMatrix& ctm,
- const SkRect& maskRect,
+ const SkIRect& maskRect,
GrTexture** result,
bool canOverwriteSrc) const override;
#endif
@@ -1235,10 +1235,11 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRRect& devRRect,
bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
const SkMatrix& ctm,
- const SkRect& maskRect,
+ const SkIRect& maskRect,
GrTexture** result,
bool canOverwriteSrc) const {
- SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
+ // 'maskRect' isn't snapped to the UL corner but the mask in 'src' is.
+ const SkIRect clipRect = SkIRect::MakeWH(maskRect.width(), maskRect.height());
GrContext* context = src->getContext();
@@ -1277,7 +1278,7 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
paint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op);
}
- drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect);
+ drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), SkRect::Make(clipRect));
}
*result = drawContext->asTexture().release();
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkGpuBlurUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698