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

Issue 1304883004: Change saveLayer() semantics to take unfiltered bounds. (Closed)

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

Description

Change saveLayer() semantics to take unfiltered bounds. For optimizing saveLayer() offscreens, it is useful to know the bounds of the primitive being drawn. Currently, the bounds passed to saveLayer() are filtered, which makes it difficult to know the original bounds of the primitive. This CL changes the semantics to accept unfiltered bounds. This actually simplifies the callsites too. In order to result in the correct pixels being produced, we then call computeFastBounds() inside clipRectBounds(). The old behaviour is wrapped in #ifdef SK_SAVE_LAYER_BOUNDS_ARE_FILTERED, until we can update Chrome's callsites (see https://codereview.chromium.org/1316243002/). This change will affect the following GMs: testimagefilters: saveLayer bounds no longer cause clipping imagefiltersbase: slight pixel diffs resizeimagefilter: slight pixel diffs on the "high quality" test case imagefilterscropexpand: displacement results are now correct filterfastbounds: slight pixel diffs matriximagefilter: slight pixel diffs BUG=skia:3194 skia:4526 Committed: https://skia.googlesource.com/skia/+/87e066ee80e094c8f4ccda3d6c33d907b414b91b

Patch Set 1 #

Patch Set 2 : Fix for stroking & other non-filter bounds adjustments #

Patch Set 3 : Put new code behind #ifdef. Don't call computeFastBounds() unless we can(). #

Patch Set 4 : Update to ToT #

Patch Set 5 : Update to ToT #

Patch Set 6 : Restore missing stroke fix #

Patch Set 7 : Update to ToT #

Patch Set 8 : Fix bounds computation for SkCanvas::onDrawBitmap #

Patch Set 9 : Update to ToT #

Patch Set 10 : Update to ToT #

Patch Set 11 : Update to ToT #

Patch Set 12 : Update to ToT #

Total comments: 10

Patch Set 13 : Update to ToT #

Patch Set 14 : More changes per review comments #

Total comments: 4

Patch Set 15 : Update to ToT; fix comments per review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -2 lines) Patch
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 chunks +147 lines, -2 lines 0 comments Download

Messages

Total messages: 50 (20 generated)
Stephen White
Reed and/or Robert: PTAL. (No API changes, but it does change the semantics of the ...
5 years, 3 months ago (2015-08-26 21:34:02 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/1
5 years, 3 months ago (2015-08-26 22:08:01 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-26 22:13:22 UTC) #6
Stephen White
If it helps, this is essentially a partial-revert of https://codereview.chromium.org/141433017: we still pass bounds to ...
5 years, 3 months ago (2015-08-27 15:06:23 UTC) #7
reed1
saveLayer(bounds, paint) This is a public call, and can be made even when there is ...
5 years, 3 months ago (2015-08-27 21:13:37 UTC) #8
Stephen White
On 2015/08/27 21:13:37, reed1 wrote: > saveLayer(bounds, paint) > > This is a public call, ...
5 years, 3 months ago (2015-08-27 21:20:39 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/20001
5 years, 3 months ago (2015-08-28 19:52:51 UTC) #11
Stephen White
OK, I've added the stanza that adjusts bounds for stroking etc. The GM proved that ...
5 years, 3 months ago (2015-08-28 19:53:43 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-28 19:58:13 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/40001
5 years, 3 months ago (2015-08-28 20:08:44 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-28 20:13:35 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/60001
5 years, 3 months ago (2015-08-31 19:16:55 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-31 19:22:06 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/220001
5 years, 1 month ago (2015-10-26 18:14:08 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-26 18:31:55 UTC) #26
reed1
Is this a valid summary for this change? 1. change the drawFoo methods to pass ...
5 years, 1 month ago (2015-10-27 17:48:53 UTC) #27
Stephen White
On 2015/10/27 17:48:53, reed1 wrote: > Is this a valid summary for this change? > ...
5 years, 1 month ago (2015-10-27 18:06:04 UTC) #28
reed1
https://codereview.chromium.org/1304883004/diff/220001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/1304883004/diff/220001/src/core/SkCanvas.cpp#newcode415 src/core/SkCanvas.cpp:415: const SkRect* bounds = nullptr) : fOrigPaint(paint) { Lets ...
5 years, 1 month ago (2015-10-27 20:05:40 UTC) #29
Stephen White
https://codereview.chromium.org/1304883004/diff/220001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/1304883004/diff/220001/src/core/SkCanvas.cpp#newcode415 src/core/SkCanvas.cpp:415: const SkRect* bounds = nullptr) : fOrigPaint(paint) { On ...
5 years, 1 month ago (2015-10-27 20:59:55 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/260001
5 years, 1 month ago (2015-10-27 21:01:42 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-27 21:12:21 UTC) #36
robertphillips
https://codereview.chromium.org/1304883004/diff/260001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/1304883004/diff/260001/src/core/SkCanvas.cpp#newcode438 src/core/SkCanvas.cpp:438: public: Well, isn't rawBounds the completely raw bounds - ...
5 years, 1 month ago (2015-10-28 16:21:47 UTC) #37
reed1
I bet we can encapsulate the various states of bounds cooking in some utility class, ...
5 years, 1 month ago (2015-10-28 16:42:06 UTC) #39
Stephen White
https://codereview.chromium.org/1304883004/diff/260001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/1304883004/diff/260001/src/core/SkCanvas.cpp#newcode438 src/core/SkCanvas.cpp:438: public: On 2015/10/28 16:21:47, robertphillips wrote: > Well, isn't ...
5 years, 1 month ago (2015-10-28 16:45:46 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/280001
5 years, 1 month ago (2015-10-28 16:47:28 UTC) #42
reed1
regarding "testimagefilters: saveLayer bounds no longer cause clipping " the differences are pretty large, so ...
5 years, 1 month ago (2015-10-28 16:50:38 UTC) #44
reed1
OK, I just played around with the GM... - It is applying the filter to ...
5 years, 1 month ago (2015-10-28 17:02:41 UTC) #45
robertphillips
lgtm
5 years, 1 month ago (2015-10-28 17:04:04 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883004/280001
5 years, 1 month ago (2015-10-28 18:23:04 UTC) #49
commit-bot: I haz the power
5 years, 1 month ago (2015-10-28 18:23:39 UTC) #50
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://skia.googlesource.com/skia/+/87e066ee80e094c8f4ccda3d6c33d907b414b91b

Powered by Google App Engine
This is Rietveld 408576698