Implement descendant-dependent compositing reasons on SPv2 property nodes |
||
Issue description
Sometimes a property tree node must be composited because another,
dependent property tree node has a direct compositing reason. This
bug tracks implementing that.
Example:
<div style="filter: ...">
A
<div style="will-change: transform">
B
</div>
</div>
The effect node for the filter must be composited because the
content B is composited, and the filter contains it & must apply as a
group to affected content.
Note that this requirement does not strictly apply to non-grouping
properties or ones that commute with other nodes, such as some clips.
Proposed implementation:
Property tree nodes maintain a count of how many direct children
have non-0 compositing bitmasks.
Add a method on PropertyTreeState called setDirectCompositingReason().
It is implemented by setting the direct compositing reason on all
of the property tree nodes in its state (not just the one that carried
the reason in the first place).
When setting the reason on a node, it notifies its parent if its
compositing reasons bitmask changed from or to 0.
When a parent is notified by a child that its bitmask changed state,
increment or decrement the count as necessary. if the count reached
0 and there is no direct compositing reason on the node, or
if it became nonzero and there is no direct compositing reason on the
node, notify its parent and set a local "descendant-dependent
compositing reason" on the bitmask.
,
Mar 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d07c15ef0a9b942de053a5eb8fba1547972d6f23 commit d07c15ef0a9b942de053a5eb8fba1547972d6f23 Author: trchen <trchen@chromium.org> Date: Fri Mar 17 00:17:35 2017 [SPv2] Implement effect compositing for indirect reasons The idea is to make PaintArtifactCompositor::collectPendingLayers a recursive algorithm to keep track of the scope of effects in the chunk list. We make a recursive call whenever an effect is entered, and return to caller whenever an effect exits. Pending layers generated in a recursion are only allowed to merge into previous layers generated in the same recursion, as if effects always have a compositing reason. So far this becomes a very conservative algorithm that would zealously composite effects for correctness. When a recursion returned to its caller, the caller would examine the pending layers generated by the callee and potentially peform two transformation: 1. If only one layer is generated, and the layer is compatible to the effect's input space, i.e. no compositing reasons in between two spaces, and the effect itself doesn't have a direct compositing reason, then "decomposite" the effect. 2. If the above transformation is done, then the "decomposited" pending layer can be seen as a regular paint chunk that paints into the current effect. Thus may be merged into a previous layer as if it is just a chunk. BUG= 683425 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2714673002 Cr-Commit-Position: refs/heads/master@{#457620} [modify] https://crrev.com/d07c15ef0a9b942de053a5eb8fba1547972d6f23/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 [modify] https://crrev.com/d07c15ef0a9b942de053a5eb8fba1547972d6f23/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp [modify] https://crrev.com/d07c15ef0a9b942de053a5eb8fba1547972d6f23/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h [modify] https://crrev.com/d07c15ef0a9b942de053a5eb8fba1547972d6f23/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
,
Jul 12 2017
,
Jul 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96dce73ef41989a5a3db52e641e5e32f3dba751b commit 96dce73ef41989a5a3db52e641e5e32f3dba751b Author: Tien-Ren Chen <trchen@chromium.org> Date: Tue Jul 18 01:57:51 2017 [Blink/SPv2] Remove workarounds that forced mask compositing We previously forced every CSS mask to composite due to not handling grouping of effects. This is no longer the case. BUG= 683425 Change-Id: Iec8d474794825f8ee7ce559d0b6d416403477464 Reviewed-on: https://chromium-review.googlesource.com/568249 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Tien-Ren Chen <trchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#487340} [modify] https://crrev.com/96dce73ef41989a5a3db52e641e5e32f3dba751b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
||
►
Sign in to add a comment |
||
Comment 1 by chrishtr@chromium.org
, Feb 3 2017Status: Assigned (was: Available)