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

Unified Diff: src/core/SkMatrixImageFilter.cpp

Issue 1134743003: antialias matrix-image-filter to get smooth diagonals (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/core/SkMatrixImageFilter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMatrixImageFilter.cpp
diff --git a/src/core/SkMatrixImageFilter.cpp b/src/core/SkMatrixImageFilter.cpp
index a61867e041a0fad2447f4aa7f9b1468d7a2f95dd..1e76362285c6939ec7e3bcf6e100f64d19370b6f 100644
--- a/src/core/SkMatrixImageFilter.cpp
+++ b/src/core/SkMatrixImageFilter.cpp
@@ -76,13 +76,13 @@ bool SkMatrixImageFilter::onFilterImage(Proxy* proxy,
return false;
}
+ SkPaint paint;
+ paint.setFilterQuality(fFilterQuality);
+ paint.setAntiAlias(true); // since we may be rotated, we definitely want a smooth edge
+
SkCanvas canvas(device.get());
canvas.translate(-SkIntToScalar(dstBounds.x()), -SkIntToScalar(dstBounds.y()));
canvas.concat(matrix);
- SkPaint paint;
-
- paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- paint.setFilterQuality(fFilterQuality);
canvas.drawBitmap(src, srcRect.x(), srcRect.y(), &paint);
*result = device.get()->accessBitmap(false);
« no previous file with comments | « src/core/SkMatrixImageFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698