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

Unified Diff: gm/morphology.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/lighting.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/morphology.cpp
diff --git a/gm/morphology.cpp b/gm/morphology.cpp
index 2150689b87eb0a3b042fcf9f1883e2505957fe4e..9e67bfaa73df0e8b4003392b476768c3d3baf893 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -70,11 +70,15 @@ protected:
{ 24, 24, 25, 25 },
};
SkPaint paint;
+#ifdef SK_CROP_RECT_IS_INT
SkIRect cropRect = SkIRect::MakeXYWH(25, 20, 100, 80);
+#else
+ SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(25, 20, 100, 80));
+#endif
for (unsigned j = 0; j < 4; ++j) {
for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) {
- const SkIRect* cr = j & 0x02 ? &cropRect : NULL;
+ const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : NULL;
if (j & 0x01) {
paint.setImageFilter(new SkErodeImageFilter(
samples[i].fRadiusX,
« no previous file with comments | « gm/lighting.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698