Chromium Code Reviews
Descriptionaura: Allow delegated frames to be used by more than one impl layer.
Delegated frames can be used by multiple impl layers within a single
compositor if they are given to different DelegatedRendererLayers which
each send the frame to their impl layer.
Also, they can be given to different DelegatedRendererLayers that live
in different compositors.
So we need something that outlives any DelegatedRendererLayer and will
receive returned resources from the impl side of multiple compositors
and know when to release resoures back to the child compositor, and how
many resources to release.
This patch introduces two new classes:
DelegatedFrameProvider. This class holds a delegated frame and notifies
a single DelegatedRendererLayer (the latest one to attach to it) about
new frames so that it can grab them and display them. If a new
DelegatedRendererLayer steals a DelegatedFrameProvider it will receive
notifications in the future and the first layer will stop updating.
DelegatedFrameResourceCollection. This class holds resources and ref
counts on them to keep track of how many refs are being used by
compositor instances, and how many refs have been received from the
child compositor. Once a resource is not in use anymore by any
compositors, all references passed from the child compositor will
be made available via TakeUnusedResourcesForChildCompositor().
Tests:
LayerTreeHostDelegatedTestTwoImplLayers
LayerTreeHostDelegatedTestRemoveAndAddToTree
LayerTreeHostDelegatedTestRemoveAndChangeResources
R=piman,alexst@chromium.org
BUG=263069
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227807
Patch Set 1 #Patch Set 2 : frameprovider: add missing files #Patch Set 3 : frameprovider: nits #
Total comments: 11
Patch Set 4 : frameprovider: more tests #
Total comments: 2
Patch Set 5 : frameprovider: refcounts #Patch Set 6 : frameprovider: fixleak #
Total comments: 2
Patch Set 7 : frameprovider: friend class #
Total comments: 2
Patch Set 8 : frameprovider: mainthreadreference #Patch Set 9 : frameprovider: fix compositor_unittests #Patch Set 10 : frameprovider: more tests #Patch Set 11 : frameprovider: android #Patch Set 12 : frameprovider: android2 #Patch Set 13 : frameprovider: android3 #Patch Set 14 : frameprovider: android4 #Patch Set 15 : frameprovider: android5 #Patch Set 16 : frameprovider: android6 #Patch Set 17 : frameprovider: android7 #Patch Set 18 : frameprovider: android8 #Patch Set 19 : frameprovider: rebase #
Total comments: 2
Patch Set 20 : frameprovider: are_layers_attached checks #Messages
Total messages: 15 (0 generated)
|