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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 134973002: Use correct matrix to adjust blur radius for gpu (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: move to ToT to land Created 6 years, 11 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/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 39f9ef3d7c9533f11f721b3054db1832c7041705..36e76e99409e2975d9581e44a2ce038dc68c0787 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);
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698