Commit 36a8594a authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[CompositeAfterPaint] Yet more accurate compositing reasons, etc.

The filter-with-PaintOffsetTranslation (crrev.com/c/2227621) broke
http/tests/devtools/layers/layer-compositing-reasons.js because the
element with reflection containing composited descendant now has a
different transform node.

BTW remove expectation entries for tests that are passing.

Change-Id: I5d2e8af77d0d559c5e24f5983c380810d0c36d21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232748Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775781}
parent d074669c
......@@ -1648,10 +1648,23 @@ CompositingReasons PaintArtifactCompositor::GetCompositingReasons(
if (!layer.property_tree_state.Transform().BackfaceVisibilitySameAsParent())
reasons |= CompositingReason::kBackfaceVisibilityHidden;
}
if (!previous_layer || &layer.property_tree_state.Effect() !=
&previous_layer->property_tree_state.Effect()) {
reasons |= layer.property_tree_state.Effect()
.DirectCompositingReasonsForDebugging();
const auto& effect = layer.property_tree_state.Effect();
if (effect.HasDirectCompositingReasons())
reasons |= effect.DirectCompositingReasonsForDebugging();
if (reasons == CompositingReason::kNone &&
layer.compositing_type == PendingLayer::kOther) {
if (effect.Opacity() != 1.0f)
reasons |= CompositingReason::kOpacityWithCompositedDescendants;
if (!effect.Filter().IsEmpty())
reasons |= CompositingReason::kFilterWithCompositedDescendants;
if (effect.BlendMode() == SkBlendMode::kDstIn)
reasons |= CompositingReason::kMaskWithCompositedDescendants;
else if (effect.BlendMode() != SkBlendMode::kSrcOver)
reasons |= CompositingReason::kBlendingWithCompositedDescendants;
}
}
if (reasons == CompositingReason::kNone &&
......
......@@ -51,7 +51,6 @@ virtual/android/fullscreen/video-overlay-scroll.html [ Failure ]
compositing/masks/mask-with-removed-filters.html [ Failure ]
external/wpt/css/css-transforms/transform3d-backface-visibility-006.html [ Failure ]
external/wpt/css/filter-effects/effect-reference-feimage-002.html [ Failure ]
external/wpt/portals/portals-rendering.html [ Failure ]
fullscreen/compositor-touch-hit-rects-fullscreen-video-controls.html [ Failure ]
printing/fixed-positioned-headers-and-footers-absolute-covering-some-pages.html [ Failure ]
......@@ -87,6 +86,3 @@ crbug.com/1047359 http/tests/subresource_filter/ad-highlight-frame-resized.html
compositing/gestures/gesture-tapHighlight-composited-img.html [ Pass Failure ]
http/tests/images/image-decode-in-frame.html [ Pass Failure ]
# Failures after crrev.com/c/2212813
fast/table/cell-percent-padding.html [ Crash ]
......@@ -7,7 +7,7 @@ Compositing reason ids for div#animation-individual: activeTransformAnimation
Compositing reason ids for div#transformWithCompositedDescendants: overlap
Compositing reason ids for div#transformWithCompositedDescendants-individual: overlap
Compositing reason ids for div#opacityWithCompositedDescendants: overflowScrolling,rootScroller
Compositing reason ids for div#reflectionWithCompositedDescendants: overflowScrolling,rootScroller
Compositing reason ids for div#reflectionWithCompositedDescendants: filterWithCompositedDescendants
Compositing reason ids for div#perspective: perspectiveWith3DDescendants
Compositing reason ids for div#preserve3d: preserve3DWith3DDescendants
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment