Skip to content

Commit

Permalink
Update render surface status for effect nodes without cc::Layers
Browse files Browse the repository at this point in the history
An effect node may need to create a render surface without an
associated cc::Layer. Previously the render surface for
will-change:opacity and opacity animation was missing in the case
because blink_effects collected in PaintArtifactCompositor contained
effect nodes associated with cc::Layers only.

Move after-update render surface update code from
PaintArtifactCompositor into PropertyTreeManager to handle render
surfaces for will-change:opacity and opacity animations without
layers.

Bug: 1123630
Change-Id: I4513657b593b86e18d20c4da690371d3d3cb0910
  • Loading branch information
wangxianzhu authored and chromium-wpt-export-bot committed Dec 29, 2021
1 parent d8a5506 commit df550c5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions css/css-color/filters-under-will-change-opacity.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="http://www.w3.org/TR/css3-color/#transparency">
<link rel="match" href="composited-filters-under-opacity-ref.html">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<style>
div {
position: absolute;
will-change: opacity;
}
.filter {
width: 100px;
height: 150px;
position: absolute;
background: yellow;
filter: invert(100%);
}
</style>
Below should be a light blue square in uniform color.
<div id="target" style="opacity: 1">
<div class="filter" style="left: 0"></div>
<div class="filter" style="left: 50px"></div>
</div>
<script>
waitForAtLeastOneFrame().then(() => {
target.style.opacity = 0.5;
takeScreenshot();
});
</script>
</html>

0 comments on commit df550c5

Please sign in to comment.