Descriptioncc: DCHECK that the OutputSurface was released in ~LayerTreeHostImpl().
The proxy will release the output surface before destroying the
LayerTreeHostImpl (and things it depends on). So instead of trying to
destroy it again in the destructor, just DCHECK that it's gone.
Problem is lots of cc unit tests weren't doing the same, so add a bunch
of ReleaseOutputSurface() calls to tests. Mostly they are done in
test harnesses like FakeLayerTreeHostImpl, except for the
LayerTreeHostImpl tests themselves, since they have a real class (and
rightfully so). They get a bunch of manual calls.
This exposed another problem. When the output surface is gone, the
tile manager is also gone. But if we didn't succeed to release the tiles
on layers at the time we destroyed the output surface, then they leak.
Turns out a bunch of tests were putting layers in the LayerTreeImpl
without getting them into the layer_list_ correctly, so they don't get
iterated by ReleaseResources. So this adds a bunch of calls to
BuildLayerListForTesting() or BuildLayerListAndPropertyTreesForTesting().
BUG=311404
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/ee6547a2a5d5543ee3fd30749978734b1fd6b17b
Cr-Commit-Position: refs/heads/master@{#403516}
Patch Set 1 #Patch Set 2 : released-outputsurface: . #
Total comments: 3
Patch Set 3 : released-outputsurface: dep #Patch Set 4 : released-outputsurface: rebase #
Total comments: 2
Patch Set 5 : released-outputsurface: rebase #
Total comments: 1
Patch Set 6 : released-outputsurface: rebase-on-2106273002 #
Depends on Patchset: Messages
Total messages: 35 (14 generated)
|