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

Unified Diff: gm/xfermodeimagefilter.cpp

Issue 26371002: Change SkImageFilter's cropRect from SkIRect to a CropRect struct (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Alternate version, using a single fFlags member. Created 7 years, 2 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') | include/core/SkImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodeimagefilter.cpp
diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp
index ef2958a0c3576b01d6d4250f8f895b0b875bba29..1e9e4d87daa48b24d039c4a3448fc04ecdd0d9fa 100644
--- a/gm/xfermodeimagefilter.cpp
+++ b/gm/xfermodeimagefilter.cpp
@@ -207,9 +207,14 @@ protected:
y + offsets[i][1],
fBitmap.width() + offsets[i][2],
fBitmap.height() + offsets[i][3]);
+#ifdef SK_CROP_RECT_IS_INT
+ SkIRect rect = cropRect;
+#else
+ SkImageFilter::CropRect rect(SkRect::Make(cropRect));
+#endif
mode.reset(SkXfermode::Create(sampledModes[i]));
filter.reset(SkNEW_ARGS(SkXfermodeImageFilter,
- (mode, offsetBackground, offsetForeground, &cropRect)));
+ (mode, offsetBackground, offsetForeground, &rect)));
paint.setImageFilter(filter);
canvas->save();
canvas->clipRect(SkRect::MakeXYWH(SkIntToScalar(x),
« no previous file with comments | « gm/offsetimagefilter.cpp ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698