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

Issue 133813005: Builder class for SkLayerDrawLooper. (Closed)

Created:
6 years, 10 months ago by Dominik Grewe
Modified:
6 years, 10 months ago
Reviewers:
scroggo, mtklein, reed2, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@draw_looper_context
Visibility:
Public.

Description

Builder class for SkLayerDrawLooper. SkLayerDrawLooper provides methods like addLayer() to build up a linked list of layers. Working towards making this class immutable, this patch introduces the SkLayerDrawLooperBuilder class which is used to accumulate all the layers first. Once all layers are in place, it creates a new SkLayerDrawLooper object and hands over the list of layers to that object. For now we keep the addLayer methods in SkLayerDrawLooper so we don't break Chrome and Blink when this is landed. Once we've updated all users, we can remove the methods. BUG=skia:2141 Committed: http://code.google.com/p/skia/source/detail?r=13448

Patch Set 1 #

Total comments: 2

Patch Set 2 : createLooper -> detachLooper #

Patch Set 3 : Make builder inner class; update tests. #

Total comments: 1

Patch Set 4 : Implement own CreateProc & remove SkLayerDrawLooper(SkReadBuffer&). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -20 lines) Patch
M include/effects/SkLayerDrawLooper.h View 1 2 3 2 chunks +42 lines, -2 lines 0 comments Download
M src/effects/SkLayerDrawLooper.cpp View 1 2 3 4 chunks +73 lines, -9 lines 0 comments Download
M tests/LayerDrawLooperTest.cpp View 1 2 3 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Dominik Grewe
This is how we could eliminate the addLayer methods. Together with the patch on introducing ...
6 years, 10 months ago (2014-02-07 18:10:55 UTC) #1
reed1
I'm fine with the idea. Seems like eventually we'd want to move all of the ...
6 years, 10 months ago (2014-02-07 18:32:22 UTC) #2
Dominik Grewe
On 2014/02/07 18:32:22, reed1 wrote: > I'm fine with the idea. > > Seems like ...
6 years, 10 months ago (2014-02-07 18:56:55 UTC) #3
Dominik Grewe
https://codereview.chromium.org/133813005/diff/1/include/effects/SkLayerDrawLooper.h File include/effects/SkLayerDrawLooper.h (right): https://codereview.chromium.org/133813005/diff/1/include/effects/SkLayerDrawLooper.h#newcode177 include/effects/SkLayerDrawLooper.h:177: SkDrawLooper* createLooper(); On 2014/02/07 18:32:22, reed1 wrote: > possibly ...
6 years, 10 months ago (2014-02-07 18:57:02 UTC) #4
scroggo
lgtm
6 years, 10 months ago (2014-02-10 18:13:53 UTC) #5
reed1
On 2014/02/07 18:56:55, Dominik Grewe wrote: > On 2014/02/07 18:32:22, reed1 wrote: > > I'm ...
6 years, 10 months ago (2014-02-10 21:17:42 UTC) #6
reed1
lets land some tests or a gm that exercises the new builder.
6 years, 10 months ago (2014-02-10 21:18:07 UTC) #7
Dominik Grewe
I've moved the builder class inside the SkLayerDrawLooper class. Turns out we also need to ...
6 years, 10 months ago (2014-02-11 10:51:40 UTC) #8
scroggo
https://codereview.chromium.org/133813005/diff/160001/src/effects/SkLayerDrawLooper.cpp File src/effects/SkLayerDrawLooper.cpp (right): https://codereview.chromium.org/133813005/diff/160001/src/effects/SkLayerDrawLooper.cpp#newcode242 src/effects/SkLayerDrawLooper.cpp:242: builder.initLooperAndReset(this); I think the main place this will be ...
6 years, 10 months ago (2014-02-11 14:48:36 UTC) #9
Dominik Grewe
On 2014/02/11 14:48:36, scroggo wrote: > https://codereview.chromium.org/133813005/diff/160001/src/effects/SkLayerDrawLooper.cpp > File src/effects/SkLayerDrawLooper.cpp (right): > > https://codereview.chromium.org/133813005/diff/160001/src/effects/SkLayerDrawLooper.cpp#newcode242 > ...
6 years, 10 months ago (2014-02-12 10:04:57 UTC) #10
scroggo
On 2014/02/12 10:04:57, Dominik Grewe wrote: > On 2014/02/11 14:48:36, scroggo wrote: > > > ...
6 years, 10 months ago (2014-02-12 19:03:02 UTC) #11
reed2
very clean api -- lgtm
6 years, 10 months ago (2014-02-13 15:13:52 UTC) #12
Dominik Grewe
Thanks!
6 years, 10 months ago (2014-02-14 09:52:54 UTC) #13
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 10 months ago (2014-02-14 09:53:00 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dominikg@chromium.org/133813005/250001
6 years, 10 months ago (2014-02-14 09:53:10 UTC) #15
commit-bot: I haz the power
6 years, 10 months ago (2014-02-14 10:06:47 UTC) #16
Message was sent while issue was closed.
Change committed as 13448

Powered by Google App Engine
This is Rietveld 408576698