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

Unified Diff: src/effects/SkBitmapSource.cpp

Issue 189913021: Implement support for a Context parameter in image filters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Revert all but the Context changes. 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 | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBitmapSource.cpp
diff --git a/src/effects/SkBitmapSource.cpp b/src/effects/SkBitmapSource.cpp
index dd44be7cd68105fb4e0d6ae83a085c50f997c48c..6834e9e32e9b5ff46ab6e4c5c0f672c464a35ead 100644
--- a/src/effects/SkBitmapSource.cpp
+++ b/src/effects/SkBitmapSource.cpp
@@ -42,11 +42,11 @@ void SkBitmapSource::flatten(SkWriteBuffer& buffer) const {
buffer.writeRect(fDstRect);
}
-bool SkBitmapSource::onFilterImage(Proxy* proxy, const SkBitmap&, const SkMatrix& matrix,
+bool SkBitmapSource::onFilterImage(Proxy* proxy, const SkBitmap&, const Context& ctx,
SkBitmap* result, SkIPoint* offset) const {
SkRect bounds, dstRect;
fBitmap.getBounds(&bounds);
- matrix.mapRect(&dstRect, fDstRect);
+ ctx.ctm().mapRect(&dstRect, fDstRect);
if (fSrcRect == bounds && dstRect == bounds) {
// No regions cropped out or resized; return entire bitmap.
*result = fBitmap;
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698