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

Unified Diff: src/core/SkCanvas.cpp

Issue 222723002: Fix matrix adjustment passed to filter processing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 1ca9312ce166784a3b2f645785058f07da8bb922..c16ac9a09f0f9437841aadf95652074b93fa709f 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1256,7 +1256,7 @@ void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y,
SkIPoint offset = SkIPoint::Make(0, 0);
const SkBitmap& src = srcDev->accessBitmap(false);
SkMatrix matrix = *iter.fMatrix;
- matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
+ matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y()));
SkIRect clipBounds = SkIRect::MakeWH(srcDev->width(), srcDev->height());
SkImageFilter::Context ctx(matrix, clipBounds);
if (filter->filterImage(&proxy, src, ctx, &dst, &offset)) {
@@ -1296,7 +1296,7 @@ void SkCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
SkBitmap dst;
SkIPoint offset = SkIPoint::Make(0, 0);
SkMatrix matrix = *iter.fMatrix;
- matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
+ matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y()));
SkIRect clipBounds = SkIRect::MakeWH(bitmap.width(), bitmap.height());
SkImageFilter::Context ctx(matrix, clipBounds);
if (filter->filterImage(&proxy, bitmap, ctx, &dst, &offset)) {
« no previous file with comments | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698