• Pawel Osciak's avatar
    Revert "Vaapi: Remove ConditionVariables and use PostTask" · 618cb634
    Pawel Osciak authored
    This reverts commit 6683995b.
    
    Reason for revert: crbug.com/823235
    
    Original change's description:
    > Vaapi: Remove ConditionVariables and use PostTask
    > 
    > 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: Daniele Castagna <dcastagna@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#542955}
    
    TBR=posciak@chromium.org,kcwu@chromium.org,mcasas@chromium.org,dcastagna@chromium.org
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Bug: 717265
    Cq-Include-Trybots: luci.chromium.try:linux_optional_gpu_tests_rel;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: I62361a33067140eb42112ccf7613136137bc30e2
    Reviewed-on: https://chromium-review.googlesource.com/967967
    Commit-Queue: Pawel Osciak <posciak@chromium.org>
    Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#544014}
    618cb634
vaapi_video_decode_accelerator.cc 31.5 KB