Skip to content

Commit

Permalink
Fix the lack of damage tracking for root layer position changes in BGPT.
Browse files Browse the repository at this point in the history
Previous to this CL, if the position of a layer changed, and that layer
was the root layer targeting a render surface, the old location of the
surface was not damaged in the *parent* render surface. With BGPT disabled,
this was masked by transform_changed being set at [1], which triggered
the conditional at [2] and caused the old location to be damaged. With
BGPT enabled, transform_changed is never set. The new logic here detects
LayerPropertyChangedNotFromPropertyTrees() for a root layer, and
triggers the conditional at [2].

[1] https://cs.chromium.org/chromium/src/cc/layers/layer.cc?rcl=4b6a562c7bde8700fe66eda5d3f65b3e48750ef2&l=758
[2] https://cs.chromium.org/chromium/src/cc/trees/damage_tracker.cc?rcl=8c9c36220d67ee9ea6a4d830b7020cceb52e5aeb&l=449

Bug: 939282
Change-Id: I946c1d85baf7096ef6199efc811cafe55798d930
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1533176
Commit-Queue: Mason Freed <[email protected]>
Commit-Queue: enne <[email protected]>
Reviewed-by: enne <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/master@{#644099}
  • Loading branch information
mfreed7 authored and chromium-wpt-export-bot committed Mar 26, 2019
1 parent ea7981d commit 8e207ff
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lifecycle/set-composited-layer-position-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>

<meta charset="utf-8">
<title>Setting composited layer position paints properly</title>
<link rel="author" title="Mason Freed" href="[email protected]">



<div id="box"></div>
<style>
div {
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background: green;
}
45 changes: 45 additions & 0 deletions lifecycle/set-composited-layer-position.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>Setting composited layer position paints properly</title>
<link rel="author" title="Mason Freed" href="[email protected]">
<link rel="help" href="https://drafts.csswg.org/cssom-view-1/">
<link rel="match" href="set-composited-layer-position-ref.html">

<div id="box"></div>
<div id="tomove"></div>
<style>
div {
position: absolute;
top: 0;
left: 0;
will-change: transform;
width: 200px;
height: 200px;
}
#box {
background: red;
}
#tomove {
background: green;
top: 200px;
left: 200px;
filter: invert(0);
}
</style>
<script>
window.onload = function() {
requestAnimationFrame(function() {
requestAnimationFrame(function() {
tomove = document.getElementById("tomove");
tomove.style.top = 0;
tomove.style.left = 0;
document.documentElement.classList.remove("reftest-wait");
});
});
}
</script>
</html>



0 comments on commit 8e207ff

Please sign in to comment.