Descriptioncc: Split out calcDrawEtc from drawLayers
Previously, calcDrawEtc was coupled to drawLayers. Immediately before drawing,
it would get called to update layer state based on any impl-side input that
came in after the commit.
Impl-side painting needs to update layer transforms / visible content rect
state prior to rasterizing contents. And, if input comes in, it might also
need to re-update prior to drawing. LayerTreeHostImpl then gets a
needsUpdateLayers() flag, and updateLayers() (which calls calcDraw) is a no-op
if nothing has changed on the tree. Additionally, the calculate render surface
layer list is persisted since the last updateLayers() call.
The LayerTreeHostImpl now sets the needsUpdate flag after commit, scroll, pinch
zoom, and animation. These are the easy ones.
Unfortunately, this creates an amazing foot gun where you can manipulate the
impl tree on the impl thread and updateLayers won't get called, because the
needsUpdate flag hasn't been called explicitly. This mostly happens in tests,
but could happen elsewhere. To fix this, setFoo calls on LayerImpl now calls
setNeedsUpdate() on its host.
BUG=155209
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172005
Patch Set 1 #
Total comments: 5
Patch Set 2 : Rename, recursive setLTHI #Patch Set 3 : Clean up unnecessary test changes #
Total comments: 25
Patch Set 4 : Address most review comments #
Total comments: 3
Patch Set 5 : Rebase #Patch Set 6 : Fix TODO comment about animations #
Total comments: 10
Patch Set 7 : Testing #
Total comments: 6
Patch Set 8 : Nits #Patch Set 9 : Rebased #
Messages
Total messages: 28 (0 generated)
|