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

Unified Diff: src/effects/SkOffsetImageFilter.cpp

Issue 186643003: Apply the CTM to the offset in the slow SkOffsetImageFilter path. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: SK_Scalar1 is my friend Created 6 years, 10 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 | « gm/offsetimagefilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkOffsetImageFilter.cpp
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp
index b36ef8a3ed68b703770be01c7593613824571208..6322a5a9b3c80f8e221f2208ea78a230d1be7e87 100644
--- a/src/effects/SkOffsetImageFilter.cpp
+++ b/src/effects/SkOffsetImageFilter.cpp
@@ -58,7 +58,9 @@ bool SkOffsetImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source,
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
canvas.translate(SkIntToScalar(srcOffset.fX - bounds.fLeft),
SkIntToScalar(srcOffset.fY - bounds.fTop));
- canvas.drawBitmap(src, fOffset.x(), fOffset.y(), &paint);
+ SkVector vec;
+ matrix.mapVectors(&vec, &fOffset, 1);
+ canvas.drawBitmap(src, vec.x(), vec.y(), &paint);
*result = device->accessBitmap(false);
offset->fX = bounds.fLeft;
offset->fY = bounds.fTop;
« no previous file with comments | « gm/offsetimagefilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698