Check if parent FrameSinkId is registered.
Add a check that the parent FrameSinkId is registered before creating an OffscreeCanvasSurfaceImpl, which is really a generic embedded surface and not just used for offscreen canvas. The IPC channel that controls the destruction of the parent CompositorFrameSink, and subsequent invalidation of parent FrameSinkId, is different than the IPC channel used to create embedded surfaces. We can't rely on ordering of messages between them. It's possible the parent FrameSinkId is invalidated before the browser gets the request to create an embedded surface. If this state is detected then just drop the request for the embedded surface. This will avoid triggering the DCHECK that the parent FrameSinkId is registered and avoid doing work for something that is about to be destroyed. The experiment to enable UseSurfaceLayerForVideo, which uses OffscreenCanvasSurfaceImpl, had tests running into this problem and hitting a DCHECK in HostFrameSinkManager::RegisterFrameSinkHierarchy(). Bug: 830003, 829306 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel Change-Id: I4e8cb26548444ecbf941a87a984b21aa4c846580 Reviewed-on: https://chromium-review.googlesource.com/1014330 Commit-Queue: kylechar <kylechar@chromium.org> Reviewed-by:Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/heads/master@{#551489}
Showing
Please register or sign in to comment