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

Issue 26371002: Change SkImageFilter's cropRect from SkIRect to a CropRect struct (Closed)

Created:
7 years, 2 months ago by Stephen White
Modified:
7 years, 2 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com, borenet
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/skia/source/detail?r=11692

Patch Set 1 #

Patch Set 2 : Created a real CropRect struct w/flags for set parameters. #

Patch Set 3 : Fix cropRectIsSet() for the SK_CROP_RECT_IS_INT case. #

Patch Set 4 : Fix Windows build #

Patch Set 5 : Alternate version, using a single fFlags member. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -53 lines) Patch
M gm/imagefilterscropped.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M gm/lighting.cpp View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M gm/morphology.cpp View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M gm/offsetimagefilter.cpp View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M gm/xfermodeimagefilter.cpp View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 3 chunks +31 lines, -5 lines 0 comments Download
M include/core/SkRect.h View 2 chunks +11 lines, -0 lines 0 comments Download
M include/effects/SkBlurImageFilter.h View 1 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkColorFilterImageFilter.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M include/effects/SkLightingImageFilter.h View 1 2 chunks +7 lines, -7 lines 0 comments Download
M include/effects/SkMergeImageFilter.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M include/effects/SkMorphologyImageFilter.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M include/effects/SkOffsetImageFilter.h View 1 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkXfermodeImageFilter.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 chunks +37 lines, -4 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 11 chunks +11 lines, -11 lines 0 comments Download
M src/effects/SkMergeImageFilter.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkOffsetImageFilter.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageFilterTest.cpp View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
Stephen White
reed: PTAL. Thanks!
7 years, 2 months ago (2013-10-07 22:08:57 UTC) #1
reed1
lgtm I think the idea of using magic values is a little tricky, both as ...
7 years, 2 months ago (2013-10-08 22:04:17 UTC) #2
robertphillips
I do worry that using magic values might bite us later (w.r.t. complexity and maintenance). ...
7 years, 2 months ago (2013-10-09 13:51:25 UTC) #3
Stephen White
On 2013/10/09 13:51:25, robertphillips wrote: > I do worry that using magic values might bite ...
7 years, 2 months ago (2013-10-09 14:07:29 UTC) #4
reed1
On 2013/10/09 14:07:29, Stephen White wrote: > On 2013/10/09 13:51:25, robertphillips wrote: > > I ...
7 years, 2 months ago (2013-10-09 14:14:55 UTC) #5
Stephen White
OK, done. PTAL.
7 years, 2 months ago (2013-10-09 16:21:46 UTC) #6
Stephen White
Patch set 5 is an alternate version, using a single fFlags member, as originally suggested. ...
7 years, 2 months ago (2013-10-09 18:38:00 UTC) #7
reed1
struct looks fine. What is the plan to transition Blink over to using it? in ...
7 years, 2 months ago (2013-10-09 19:57:21 UTC) #8
Stephen White
On 2013/10/09 19:57:21, reed1 wrote: > struct looks fine. > > What is the plan ...
7 years, 2 months ago (2013-10-09 20:07:42 UTC) #9
Stephen White
On 2013/10/09 20:07:42, Stephen White wrote: > On 2013/10/09 19:57:21, reed1 wrote: > > struct ...
7 years, 2 months ago (2013-10-09 20:18:01 UTC) #10
reed1
lgtm seems like we need to be testing (in skia) both settings, to ensure that ...
7 years, 2 months ago (2013-10-09 20:23:03 UTC) #11
Stephen White
Come to think of it, it should be safe to preemptively land the SK_CROP_RECT_IS_INT change ...
7 years, 2 months ago (2013-10-09 20:45:46 UTC) #12
Stephen White
7 years, 2 months ago (2013-10-10 13:51:29 UTC) #13
Message was sent while issue was closed.
Committed patchset #5 manually as r11692 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698