Currently TextureLayerImpl will in ReleaseResources()
1. drop its TransferableResource if it did not import it to the ResourceProvider.
2. remove it from the ResourceProvider otherwise
In both of these cases the resource is returned to the client with its ReleaseCallback running.
However this poses a problem for VizDisplayCompositor software mode. In this case, the CompositorFrameSink can be lost, while the TextureLayer client will not know since it's not generating resources with a ContextProvider (which it would see lost and recreate resources).
IMO the answer here is to let TextureLayerImpl persist software-backed resources across a new LayerTreeFrameSink. So that is:
1. don't drop the TransferableResource if |is_software|
2. remove the resource from ResourceProvider (cuz the RP will be deleted), but in such a way that the ReleaseCallback is not run, and ownership of the TransferableResource is returned to the TextureLayerImpl.
Comment 1 by danakj@chromium.org
, Mar 28 2018