• Miguel Casas's avatar
    Vaapi: Remove ConditionVariables and use PostTask · 6683995b
    Miguel Casas authored
    This CL removes the use of the ConditionVariables inside VaVDA and
    uses instead PostTask()ing. This removes blocking the worker
    thread, which allows for moving other tasks there, e.g. the
    Surface Blit (as done in the follow up WIP CL crrev.com/c/947341)
    
    For all that goodness, this CL:
    
    - Refactors the waiting logic that on ToT is spread between
     GetCurrInputBuffer_Locked() and WaitForSurfaces_Locked() and
     simplifies it in DecodeTask() itself.
    
    - Moves the |curr_input_buffer_| filling logic in
     GetCurrInputBuffer_Locked() into DecodeTask() proper.
    
    - Reduces the scoped of the |lock_| in DecodeTask() (note that
     |curr_input_buffer_| and |decode_| are only used on the decoder
     thread -- added a .h comment).
    
    Minor stuff: This CL also moves together the declaration of the
    related member vars |input_buffers_|, |curr_input_buffer_| and
    |available_va_surfaces_|
    
    TEST=simplechrome+crosvideo (including seeks) on soraka, and
    v_d_a_unittest with h264, vp8, vp9 (with dcheck_always_on=true).
    
    Bug: 717265
    Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: Ib167115dd2a4ebaeaea3ba3b5a205779d659f479
    Reviewed-on: https://chromium-review.googlesource.com/949283
    Commit-Queue: Miguel Casas <mcasas@chromium.org>
    Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#542955}
    6683995b
vaapi_video_decode_accelerator.cc 29.1 KB