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

Issue 2144823006: Reuse existing paint property node is possible (Closed)

Created:
4 years, 5 months ago by Xianzhu
Modified:
4 years, 5 months ago
Reviewers:
pdr., trchen
CC:
jbroman, ajuma+watch_chromium.org, blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reuse existing paint property node is possible This is required by subsequence caching for spv2. When we copy a cached subsequence, we won't do actual paint and will use the existing PaintChunkProperties which points to the paint property nodes created during the previous paint. We are sure that the values of these property nodes didn't change since the previous paint because we can use the cached subsequence. To meet this requirement, when building the paint property tree, instead of rebuilding the whole tree by creating all new nodes, we should reuse the existing nodes if their values don't change. The reused nodes should be placed in the new tree. In the future we may also reuse a whole subtree of property nodes. BUG=596983 Committed: https://crrev.com/808643f3e84e993f05d2d2afdf1bab56217291b0 Cr-Commit-Position: refs/heads/master@{#407243}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : - #

Patch Set 4 : Rebase #

Patch Set 5 : - #

Patch Set 6 : - #

Total comments: 10

Patch Set 7 : Use existing paint property node is possible #

Patch Set 8 : - #

Total comments: 2

Patch Set 9 : - #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -238 lines) Patch
M third_party/WebKit/Source/core/paint/ObjectPaintProperties.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 1 2 3 4 5 6 7 8 9 chunks +151 lines, -138 lines 2 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 2 3 4 5 6 1 chunk +74 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp View 1 2 3 4 5 6 15 chunks +28 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h View 1 2 3 4 5 6 2 chunks +15 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h View 1 2 3 4 5 6 2 chunks +11 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp View 1 2 3 4 5 6 12 chunks +21 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp View 1 2 3 4 5 6 4 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp View 1 2 3 4 5 6 6 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/TransformPaintPropertyNode.h View 1 2 3 4 5 6 2 chunks +13 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 45 (27 generated)
Xianzhu
4 years, 5 months ago (2016-07-14 23:09:52 UTC) #9
trchen
How are we going reassign property nodes to paint chunks that uses properties inherited from ...
4 years, 5 months ago (2016-07-14 23:43:18 UTC) #10
Xianzhu
On 2016/07/14 23:43:18, trchen wrote: > How are we going reassign property nodes to paint ...
4 years, 5 months ago (2016-07-15 15:30:42 UTC) #13
chrishtr
On 2016/07/14 at 23:43:18, trchen wrote: > How are we going reassign property nodes to ...
4 years, 5 months ago (2016-07-15 15:56:14 UTC) #14
Xianzhu
On 2016/07/15 15:56:14, chrishtr wrote: > On 2016/07/14 at 23:43:18, trchen wrote: > > How ...
4 years, 5 months ago (2016-07-15 17:09:04 UTC) #15
Xianzhu
On 2016/07/14 23:43:18, trchen wrote: > How are we going reassign property nodes to paint ...
4 years, 5 months ago (2016-07-15 17:11:46 UTC) #16
Xianzhu
I created another CL for paint property tree isolation boundaries: https://codereview.chromium.org/2161523002/. In this way we ...
4 years, 5 months ago (2016-07-18 16:34:49 UTC) #23
pdr.
I will review this first thing tomorrow.
4 years, 5 months ago (2016-07-21 04:02:40 UTC) #24
pdr.
https://codereview.chromium.org/2144823006/diff/100001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2144823006/diff/100001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode76 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:76: PropertyNode* PaintPropertyTreeBuilder::updateObjectPaintProperty(const LayoutObject& object, PaintPropertyTreeBuilderContext& context, PropertyNode*& contextProperty) This ...
4 years, 5 months ago (2016-07-21 21:34:07 UTC) #25
Xianzhu
https://codereview.chromium.org/2144823006/diff/100001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2144823006/diff/100001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode76 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:76: PropertyNode* PaintPropertyTreeBuilder::updateObjectPaintProperty(const LayoutObject& object, PaintPropertyTreeBuilderContext& context, PropertyNode*& contextProperty) On ...
4 years, 5 months ago (2016-07-22 01:14:05 UTC) #26
pdr.
Really nice overall. https://codereview.chromium.org/2144823006/diff/140001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2144823006/diff/140001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode93 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:93: if (existingPropertyNode) { In the previous ...
4 years, 5 months ago (2016-07-22 01:29:50 UTC) #31
Xianzhu
https://codereview.chromium.org/2144823006/diff/140001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2144823006/diff/140001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode93 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:93: if (existingPropertyNode) { On 2016/07/22 01:29:50, pdr. wrote: > ...
4 years, 5 months ago (2016-07-22 04:21:03 UTC) #34
pdr.
SGTM, LGTM
4 years, 5 months ago (2016-07-22 16:24:35 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2144823006/160001
4 years, 5 months ago (2016-07-22 20:16:57 UTC) #39
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 5 months ago (2016-07-22 20:21:28 UTC) #41
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/808643f3e84e993f05d2d2afdf1bab56217291b0 Cr-Commit-Position: refs/heads/master@{#407243}
4 years, 5 months ago (2016-07-22 20:22:42 UTC) #43
jbroman
https://codereview.chromium.org/2144823006/diff/160001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right): https://codereview.chromium.org/2144823006/diff/160001/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp#newcode95 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:95: contextProperty = existingPropertyNode; Ex-post-facto: this was extremely confusing to ...
4 years, 5 months ago (2016-07-24 01:08:23 UTC) #44
Xianzhu
4 years, 5 months ago (2016-07-24 22:18:42 UTC) #45
Message was sent while issue was closed.
https://codereview.chromium.org/2144823006/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp (right):

https://codereview.chromium.org/2144823006/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp:95:
contextProperty = existingPropertyNode;
On 2016/07/24 01:08:23, jbroman wrote:
> Ex-post-facto: this was extremely confusing to me when I was trying to merge
my
> CL with this. At the call sites it's not obvious at all that one of the
> parameters in the middle is an in-out parameter (a non-const
> reference-to-pointer).
> 
> Why not just return this and allow the assignment to happen at the call sites,
> and possibly also create the node if necessary without properties, and use
only
> the update method to pass parameters, avoiding the need for the variadic
> template which is pretty subtle. (In particular, this function does not
> perfectly forward parameters, so there is unnecessary refcount thrashing on
the
> args, and it would be impossible to pass a move-only type as an argument.)

Thanks for the suggestions. Addressed them in
https://codereview.chromium.org/2173363002/.

Powered by Google App Engine
This is Rietveld 408576698