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

Issue 1475793002: Fix merge crop rect computation. (Closed)

Created:
5 years ago by Stephen White
Modified:
5 years ago
Reviewers:
robertphillips
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix SkMergeImageFilter crop rect computation. The crop rect should be applied to the union of the input bounds, not to the src input's bounds. These are often the same, since the saveLayer offscreen size is computed as the union of all the required bounds, but is not correct if the input primitive is not used (e.g., if all inputs are connected to SkImageSources). But this will change as we move to more accurate intermediate bounds computations (getting rid of the join() hacks as described in skbug.com/3194). Since we can't know this without actually processing the inputs, split SkMergeImageFilter processing into: - filter all inputs - applyCropRect to the union'ed bounds - allocate the destination - do the merge BUG=3194 Committed: https://skia.googlesource.com/skia/+/4a24398391536f7b176b44a8c45dc288655b4adb

Patch Set 1 #

Patch Set 2 : 100-col fixes #

Patch Set 3 : Fix uninitialized var, and restore abort-on-no-valid-inputs behaviour. #

Total comments: 8

Patch Set 4 : Fixes per review comments #

Patch Set 5 : Add comments; this-> #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -21 lines) Patch
M src/effects/SkMergeImageFilter.cpp View 1 2 3 4 4 chunks +39 lines, -21 lines 0 comments Download
M tests/ImageFilterTest.cpp View 1 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
Stephen White
Rob: PTAL. Thanks!
5 years ago (2015-11-24 19:53:23 UTC) #4
robertphillips
https://codereview.chromium.org/1475793002/diff/40001/src/effects/SkMergeImageFilter.cpp File src/effects/SkMergeImageFilter.cpp (right): https://codereview.chromium.org/1475793002/diff/40001/src/effects/SkMergeImageFilter.cpp#newcode66 src/effects/SkMergeImageFilter.cpp:66: this->countInputs() ? // Basically move the CL's description in ...
5 years ago (2015-11-24 20:58:16 UTC) #5
Stephen White
Thanks for your review; new patch up. https://codereview.chromium.org/1475793002/diff/40001/src/effects/SkMergeImageFilter.cpp File src/effects/SkMergeImageFilter.cpp (right): https://codereview.chromium.org/1475793002/diff/40001/src/effects/SkMergeImageFilter.cpp#newcode66 src/effects/SkMergeImageFilter.cpp:66: On 2015/11/24 ...
5 years ago (2015-11-24 21:15:53 UTC) #6
Stephen White
New patch up for realz this time.
5 years ago (2015-11-24 21:22:41 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1475793002/70001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1475793002/70001
5 years ago (2015-11-24 21:25:48 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-11-24 21:38:19 UTC) #11
robertphillips
lgtm
5 years ago (2015-11-25 14:39:35 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1475793002/70001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1475793002/70001
5 years ago (2015-11-25 15:06:08 UTC) #14
commit-bot: I haz the power
5 years ago (2015-11-25 15:06:58 UTC) #15
Message was sent while issue was closed.
Committed patchset #5 (id:70001) as
https://skia.googlesource.com/skia/+/4a24398391536f7b176b44a8c45dc288655b4adb

Powered by Google App Engine
This is Rietveld 408576698