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

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed)

Created:
6 years, 10 months ago by Dominik Grewe
Modified:
6 years, 9 months ago
CC:
blink-reviews, jamesr, krit, dsinclair, danakj, Rik, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. The addLayer() methods of SkLayerDrawLooper will soon be removed. This CL updates all uses of those methods with the corresponding methods in SkLayerDrawLooper::Builder. BUG=skia:2141 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168041 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169335

Patch Set 1 #

Total comments: 3

Patch Set 2 : DrawLooper::Builder #

Total comments: 7

Patch Set 3 : Use OwnPtr instead of RefPtr #

Total comments: 2

Patch Set 4 : Use RefPtr for SkDrawLooper #

Patch Set 5 : Remove DrawLooper. #

Total comments: 4

Patch Set 6 : Add FINAL & DrawLooperBuilder::create(). #

Total comments: 2

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -255 lines) Patch
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/EllipsisBox.cpp View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/rendering/InlineTextBox.cpp View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/rendering/svg/SVGInlineTextBox.cpp View 1 2 3 4 5 6 2 chunks +6 lines, -6 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/DrawLooper.h View 1 2 3 4 1 chunk +0 lines, -79 lines 0 comments Download
M Source/platform/graphics/DrawLooper.cpp View 1 2 3 4 1 chunk +0 lines, -104 lines 0 comments Download
A + Source/platform/graphics/DrawLooperBuilder.h View 1 2 3 4 5 3 chunks +17 lines, -14 lines 0 comments Download
A + Source/platform/graphics/DrawLooperBuilder.cpp View 1 2 3 4 5 3 chunks +15 lines, -10 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.h View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.cpp View 1 2 3 4 5 6 3 chunks +12 lines, -12 lines 0 comments Download
M Source/platform/graphics/GraphicsContextState.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/graphics/GraphicsContextState.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
Dominik Grewe
PTAL. Wasn't sure whether to rename 'DrawLooper' to 'DrawLooperBuilder'. I left it for now but ...
6 years, 10 months ago (2014-02-24 12:41:36 UTC) #1
jbroman
Unsolicited (non-owner) comments; hope you don't mind. https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h File Source/platform/graphics/DrawLooper.h (right): https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h#newcode66 Source/platform/graphics/DrawLooper.h:66: SkDrawLooper* skDrawLooper(); ...
6 years, 10 months ago (2014-02-24 15:23:32 UTC) #2
Stephen Chennney
As jbroman has said, I think there are some significant issues here with const-ness and ...
6 years, 10 months ago (2014-02-24 15:46:40 UTC) #3
Dominik Grewe
https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h File Source/platform/graphics/DrawLooper.h (right): https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h#newcode66 Source/platform/graphics/DrawLooper.h:66: SkDrawLooper* skDrawLooper(); On 2014/02/24 15:23:33, jbroman wrote: > This ...
6 years, 10 months ago (2014-02-24 15:47:28 UTC) #4
Stephen Chennney
On 2014/02/24 15:47:28, Dominik Grewe wrote: > https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h > File Source/platform/graphics/DrawLooper.h (right): > > https://codereview.chromium.org/177473003/diff/1/Source/platform/graphics/DrawLooper.h#newcode66 ...
6 years, 10 months ago (2014-02-24 15:53:32 UTC) #5
Dominik Grewe
I've added a Builder class to DrawLooper. I also made DrawLooper ref-counted so we don't ...
6 years, 10 months ago (2014-02-24 17:16:03 UTC) #6
jbroman
I'm liking this much better. https://codereview.chromium.org/177473003/diff/120001/Source/core/rendering/EllipsisBox.cpp File Source/core/rendering/EllipsisBox.cpp (right): https://codereview.chromium.org/177473003/diff/120001/Source/core/rendering/EllipsisBox.cpp#newcode80 Source/core/rendering/EllipsisBox.cpp:80: context->setDrawLooper(*drawLooperBuilder.detachDrawLooper().get()); This seems awkward. ...
6 years, 10 months ago (2014-02-24 17:47:44 UTC) #7
Dominik Grewe
https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.h File Source/platform/graphics/DrawLooper.h (right): https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.h#newcode47 Source/platform/graphics/DrawLooper.h:47: class PLATFORM_EXPORT DrawLooper : public RefCounted<DrawLooper> { On 2014/02/24 ...
6 years, 10 months ago (2014-02-24 18:11:56 UTC) #8
jbroman
https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.h File Source/platform/graphics/DrawLooper.h (right): https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.h#newcode47 Source/platform/graphics/DrawLooper.h:47: class PLATFORM_EXPORT DrawLooper : public RefCounted<DrawLooper> { On 2014/02/24 ...
6 years, 10 months ago (2014-02-24 18:18:52 UTC) #9
Dominik Grewe
Using OwnPtr now. PTAL https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.cpp File Source/platform/graphics/DrawLooper.cpp (right): https://codereview.chromium.org/177473003/diff/120001/Source/platform/graphics/DrawLooper.cpp#newcode45 Source/platform/graphics/DrawLooper.cpp:45: DrawLooper::DrawLooper(SkDrawLooper* looper) : m_skDrawLooper(adoptRef(looper)) { ...
6 years, 10 months ago (2014-02-24 18:34:39 UTC) #10
jbroman
OwnPtr only for non-refcounted things, RefPtr for refcounted (WebCore::RefCounted and SkRefCnt) things. Otherwise, looks good ...
6 years, 10 months ago (2014-02-24 18:53:37 UTC) #11
Dominik Grewe
https://codereview.chromium.org/177473003/diff/210001/Source/platform/graphics/DrawLooper.h File Source/platform/graphics/DrawLooper.h (right): https://codereview.chromium.org/177473003/diff/210001/Source/platform/graphics/DrawLooper.h#newcode88 Source/platform/graphics/DrawLooper.h:88: OwnPtr<SkDrawLooper> m_skDrawLooper; On 2014/02/24 18:53:38, jbroman wrote: > I'm ...
6 years, 10 months ago (2014-02-24 19:41:02 UTC) #12
Dominik Grewe
Okay, I should be using RefPtr/OwnPtr in the right places now. PTAL.
6 years, 10 months ago (2014-02-25 10:29:57 UTC) #13
jbroman
Great work. LGTM.
6 years, 10 months ago (2014-02-25 13:58:31 UTC) #14
Stephen Chennney
not lgtm. I would be far more comfortable if you modified GraphicsContext::setDrawLooper to take a ...
6 years, 10 months ago (2014-02-25 17:26:43 UTC) #15
Stephen Chennney
On 2014/02/25 17:26:43, Stephen Chenney wrote: > not lgtm. I would be far more comfortable ...
6 years, 10 months ago (2014-02-25 17:36:56 UTC) #16
Dominik Grewe
On 2014/02/25 17:36:56, Stephen Chenney wrote: > On 2014/02/25 17:26:43, Stephen Chenney wrote: > > ...
6 years, 10 months ago (2014-02-25 18:15:08 UTC) #17
Stephen Chennney
On 2014/02/25 18:15:08, Dominik Grewe wrote: > On 2014/02/25 17:36:56, Stephen Chenney wrote: > > ...
6 years, 10 months ago (2014-02-25 18:19:07 UTC) #18
jbroman
On 2014/02/25 17:26:43, Stephen Chenney wrote: > not lgtm. I would be far more comfortable ...
6 years, 10 months ago (2014-02-25 18:19:31 UTC) #19
Stephen Chennney
On 2014/02/25 18:19:31, jbroman wrote: > On 2014/02/25 17:26:43, Stephen Chenney wrote: > > not ...
6 years, 10 months ago (2014-02-25 18:27:30 UTC) #20
jbroman
On 2014/02/25 18:27:30, Stephen Chenney wrote: > On 2014/02/25 18:19:31, jbroman wrote: > > On ...
6 years, 10 months ago (2014-02-25 18:35:05 UTC) #21
Stephen Chennney
On 2014/02/25 18:35:05, jbroman wrote: > > We would never need to expose the type. ...
6 years, 10 months ago (2014-02-25 18:57:00 UTC) #22
Dominik Grewe
I now removed DrawLooper and we only have DrawLooperBuilder. GraphicsContext::setDrawLooper() gets a PassOwnPtr<> and calls ...
6 years, 10 months ago (2014-02-26 10:38:45 UTC) #23
Stephen Chennney
LGTM with one nit. https://codereview.chromium.org/177473003/diff/390001/Source/platform/graphics/DrawLooperBuilder.h File Source/platform/graphics/DrawLooperBuilder.h (right): https://codereview.chromium.org/177473003/diff/390001/Source/platform/graphics/DrawLooperBuilder.h#newcode46 Source/platform/graphics/DrawLooperBuilder.h:46: class PLATFORM_EXPORT DrawLooperBuilder { Add ...
6 years, 10 months ago (2014-02-26 19:35:17 UTC) #24
jbroman
Still LGTM. One itty-bitty suggestion that you might want to consider, but I'm quite happy ...
6 years, 10 months ago (2014-02-26 19:46:08 UTC) #25
Dominik Grewe
Thanks! https://codereview.chromium.org/177473003/diff/390001/Source/core/rendering/EllipsisBox.cpp File Source/core/rendering/EllipsisBox.cpp (right): https://codereview.chromium.org/177473003/diff/390001/Source/core/rendering/EllipsisBox.cpp#newcode70 Source/core/rendering/EllipsisBox.cpp:70: OwnPtr<DrawLooperBuilder> drawLooperBuilder = adoptPtr(new DrawLooperBuilder); On 2014/02/26 19:46:09, ...
6 years, 9 months ago (2014-02-27 12:15:08 UTC) #26
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 9 months ago (2014-02-27 14:17:24 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/177473003/410001
6 years, 9 months ago (2014-02-27 14:17:36 UTC) #28
commit-bot: I haz the power
Change committed as 168041
6 years, 9 months ago (2014-02-27 17:12:43 UTC) #29
Dominik Grewe
A revert of this CL has been created in https://codereview.chromium.org/178113003/ by dominikg@chromium.org. The reason for ...
6 years, 9 months ago (2014-03-01 10:02:55 UTC) #30
Stephen Chennney
https://codereview.chromium.org/177473003/diff/410001/Source/platform/graphics/GraphicsContext.h File Source/platform/graphics/GraphicsContext.h (right): https://codereview.chromium.org/177473003/diff/410001/Source/platform/graphics/GraphicsContext.h#newcode324 Source/platform/graphics/GraphicsContext.h:324: void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); The problem was that this should be ...
6 years, 9 months ago (2014-03-03 13:40:47 UTC) #31
Dominik Grewe
https://codereview.chromium.org/177473003/diff/410001/Source/platform/graphics/GraphicsContext.h File Source/platform/graphics/GraphicsContext.h (right): https://codereview.chromium.org/177473003/diff/410001/Source/platform/graphics/GraphicsContext.h#newcode324 Source/platform/graphics/GraphicsContext.h:324: void setDrawLooper(PassOwnPtr<DrawLooperBuilder>); On 2014/03/03 13:40:48, Stephen Chenney wrote: > ...
6 years, 9 months ago (2014-03-03 13:45:23 UTC) #32
Dominik Grewe
Any ideas on how this patch could have caused the crashes reported in crbug.com/348122 ? ...
6 years, 9 months ago (2014-03-13 18:11:13 UTC) #33
Stephen Chennney
On 2014/03/13 18:11:13, Dominik Grewe wrote: > Any ideas on how this patch could have ...
6 years, 9 months ago (2014-03-13 18:23:45 UTC) #34
Dominik Grewe
On 2014/03/13 18:23:45, Stephen Chenney wrote: > On 2014/03/13 18:11:13, Dominik Grewe wrote: > > ...
6 years, 9 months ago (2014-03-14 10:25:17 UTC) #35
Stephen Chennney
I looked through the crash logs too, and it does seem like we've been crashing ...
6 years, 9 months ago (2014-03-14 23:13:41 UTC) #36
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 9 months ago (2014-03-17 09:43:31 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/177473003/430001
6 years, 9 months ago (2014-03-17 09:43:40 UTC) #38
commit-bot: I haz the power
6 years, 9 months ago (2014-03-17 11:01:39 UTC) #39
Message was sent while issue was closed.
Change committed as 169335

Powered by Google App Engine
This is Rietveld 408576698