• Miguel Casas's avatar
    media/gpu/linux: convert MailboxVideoFrameConverter to SharedImages · 6f6776f4
    Miguel Casas authored
    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: default avatarAlexandre Courbot <acourbot@chromium.org>
    Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
    Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
    Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
    Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#698666}
    6f6776f4
mailbox_video_frame_converter.h 6.91 KB