diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-06-20 14:52:04 +0100 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-06-20 14:52:04 +0100 |
commit | f8ee788a64d60abd8f2d742a5fdedde054ecd910 (patch) | |
tree | 7dc14380200b953c64e0ccd16435cdbd1dbf1205 /content/common/gpu/media/vaapi_video_decode_accelerator.cc | |
parent | fcbbbe23a38088a52492922075e71a419c4b01ec (diff) | |
download | chromium_org-f8ee788a64d60abd8f2d742a5fdedde054ecd910.tar.gz |
Merge from Chromium at DEPS revision 278205
This commit was generated by merge_to_master.py.
Change-Id: I23f1e7ea8c154ba72e7fb594436216f861f868ab
Diffstat (limited to 'content/common/gpu/media/vaapi_video_decode_accelerator.cc')
-rw-r--r-- | content/common/gpu/media/vaapi_video_decode_accelerator.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc index 4b2c49e7d1..b68f5d46da 100644 --- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc +++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc @@ -895,15 +895,13 @@ void VaapiVideoDecodeAccelerator::Cleanup() { client_ptr_factory_.reset(); weak_this_factory_.InvalidateWeakPtrs(); + // Signal all potential waiters on the decoder_thread_, let them early-exit, + // as we've just moved to the kDestroying state, and wait for all tasks + // to finish. + input_ready_.Signal(); + surfaces_available_.Signal(); { base::AutoUnlock auto_unlock(lock_); - // Post a dummy task to the decoder_thread_ to ensure it is drained. - base::WaitableEvent waiter(false, false); - decoder_thread_proxy_->PostTask(FROM_HERE, base::Bind( - &base::WaitableEvent::Signal, base::Unretained(&waiter))); - input_ready_.Signal(); - surfaces_available_.Signal(); - waiter.Wait(); decoder_thread_.Stop(); } @@ -916,4 +914,8 @@ void VaapiVideoDecodeAccelerator::Destroy() { delete this; } +bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { + return false; +} + } // namespace content |