[SPv2] Add CSS mask support

Desktop / Chromium - trchen [chromium.org] - 17 February 2017 02:35 EST

This CL adds CSS mask support for SPv2. The following changes have been made:

- Presence of a mask will ensure the main effect node, although the mask is not applied to it directly.

- The mask itself will paint into a child isolated group of the main effect node, with kDstIn blend mode.

- CSS filter has been moved to a dedicated effect node. This is because the mask must composite on top of filtered contents but before applying other effects.

- Mask will also create an accompanied output clip, because masked contents outside of the mask's extent shall be considered masked out.

- Currently both the main effect nodes and the mask will have forced compositing reason, which diverges from SPv1 behavior. This is due to the PaintArtifactCompositor doesn't handle grouping correctly yet.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2641173008 Cr-Commit-Position: refs/heads/master@{#451263}

24ffc96 [SPv2] Add CSS mask support
.../FlagExpectations/enable-slimming-paint-v2 | 22 +--
third_party/WebKit/Source/core/css/FontFace.h | 10 +-
third_party/WebKit/Source/core/css/FontFaceSet.h | 10 +-
.../WebKit/Source/core/layout/LayoutTestHelper.cpp | 20 +++
.../WebKit/Source/core/layout/LayoutTestHelper.h | 2 +
.../layout/compositing/CompositingReasonFinder.cpp | 33 +++-
.../layout/compositing/CompositingReasonFinder.h | 4 +
.../WebKit/Source/core/paint/BoxPainter.cpp | 7 +-
.../Source/core/paint/InlineFlowBoxPainter.cpp | 11 +-
.../Source/core/paint/ObjectPaintProperties.h | 64 +++++++-
.../WebKit/Source/core/paint/PaintLayer.cpp | 5 +-
third_party/WebKit/Source/core/paint/PaintLayer.h | 2 +-
.../WebKit/Source/core/paint/PaintLayerPainter.cpp | 63 ++++---
.../Source/core/paint/PaintPropertyTreeBuilder.cpp | 182 +++++++++++++++++----
.../Source/core/paint/PaintPropertyTreeBuilder.h | 2 +
.../core/paint/PaintPropertyTreeBuilderTest.cpp | 131 ++++++++++++++-
16 files changed, 452 insertions(+), 116 deletions(-)

Upstream: git.chromium.org


  • Share