From b295fb6ff3222453912dfcb7a1ea5184d40014b5 Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Thu, 10 Oct 2013 13:51:19 +0000 Subject: Change SkImageFilter's cropRect from SkIRect to a CropRect struct, containing an SkRect and flags indicating which parameters are set. NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll. Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect. R=reed@google.com Review URL: https://codereview.chromium.org/26371002 git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/morphology.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gm/morphology.cpp') diff --git a/gm/morphology.cpp b/gm/morphology.cpp index 2150689b87..9e67bfaa73 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, -- cgit v1.2.3