Mac zero copy capture: Update blink::VideoCaptureImpl
Fix or update several DCHECKs and crashes that occur with GpuMemoryBuffer backed capture frames. Most substantially, when hardware acceleration is disabled (and so VideoCaptureImpl::gpu_factories_ or media_task_runner_ are absent, allow the GpuMemoryBuffer to be reinterpreted as external system memory, by using media::VideoFrame::WrapIOSurface. Move around some of the CHECKs for gpu_factories_ or media_task_runner_ to only trigger when we are heading into hardware accelerated paths. Move a DCHECK in BindBufferToTextureOnMediaThread that would trigger when the Gpu process crashes during capture (the frame will report that it is of UNKNOWN format, and it will be DCHECKed that it is NV12). Update the destructor ~BufferContext to only destroy the GpuMemoryBuffer-backed SharedImage if the SharedImage has been created (not if the BufferContext is of type GpuMemoryBuffer). Weaken a DCHECK in OnAllClientsFinishedConsumingFrame that is invalid for all GpuMemoryBuffer-backed frames on all platforms (it only happens to not be hit most of the time due to a race condition described in the referenced TODO). Bug: 1128853, 1125879 Change-Id: I2bc26b1c4bbb63c1fdc2696f8e565ec418c3c501 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419510Reviewed-by:Guido Urdaneta <guidou@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#809011}
Showing
Please register or sign in to comment