media/gpu/linux: convert MailboxVideoFrameConverter to SharedImages
This CL migrates MailboxVideoFrameConverter from using Textures to using SharedImages. No external functionality changes are expected. Couple of things need to be added: - ScopedSharedImage: an internal class to scope a SharedImage lifetime. SharedImages are kept in |shared_images_|, indexed by a unique id. - Added GetGpuChannelCB that can be derived from the GetStubCB and that is needed for SharedImage creation and destruction. They are generated on Create(), so this interface doesn't change. - This CL uses a WeakPtr to the GpuChannel, accessing its SharedImageStub and the gpu::Scheduler that way. Most of the work goes in: - InitializeOnGpuTaskRunner() and then - the sequence ConvertFrameOnGPUThread() (calls either GenerateSharedImageOnGPUThread() or UpdateSharedImageOnGPUThread()) then jumps back to WrapMailboxAndVideoFrameAndOutput(). Test: crosvideo.appspot.com resolution-changing videos (vp9, h264, vp8) of course with the new VD decoder, on kohaku and scarlet/dru. Bug: 998279 Change-Id: Ic9b5b2270d1b488562bc2725bba89dc2a0350012 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772642 Commit-Queue: Miguel Casas <mcasas@chromium.org> Reviewed-by:Alexandre Courbot <acourbot@chromium.org> Reviewed-by:
Eric Karl <ericrk@chromium.org> Reviewed-by:
Chih-Yu Huang <akahuang@chromium.org> Reviewed-by:
Dan Sanders <sandersd@chromium.org> Reviewed-by:
Andres Calderon Jaramillo <andrescj@chromium.org> Cr-Commit-Position: refs/heads/master@{#698666}
Showing
This diff is collapsed.
Please register or sign in to comment