Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

Issue 23125014: Run VDA::Decode on GPU IO thread if VDA supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a separate MessageFilter for GVDA Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
index cd18574a8d8142d65f6fb5485444a60218d62a25..ca375754a2be66c90c7ad3bfaeec36b773782fa3 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
@@ -44,7 +44,6 @@ VaapiVideoDecodeAccelerator::InputBuffer::~InputBuffer() {
void VaapiVideoDecodeAccelerator::NotifyError(Error error) {
if (message_loop_ != base::MessageLoop::current()) {
- DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current());
message_loop_->PostTask(FROM_HERE, base::Bind(
&VaapiVideoDecodeAccelerator::NotifyError, weak_this_, error));
return;
@@ -242,7 +241,8 @@ VaapiVideoDecodeAccelerator::TFPPicture*
VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
Display* x_display, GLXContext glx_context,
Client* client,
- const base::Callback<bool(void)>& make_context_current)
+ const base::Callback<bool(void)>& make_context_current,
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
: x_display_(x_display),
glx_context_(glx_context),
make_context_current_(make_context_current),
@@ -250,6 +250,7 @@ VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
input_ready_(&lock_),
surfaces_available_(&lock_),
message_loop_(base::MessageLoop::current()),
+ io_message_loop_(io_message_loop),
weak_this_(base::AsWeakPtr(this)),
client_ptr_factory_(client),
client_(client_ptr_factory_.GetWeakPtr()),
@@ -411,7 +412,7 @@ void VaapiVideoDecodeAccelerator::TryOutputSurface() {
void VaapiVideoDecodeAccelerator::MapAndQueueNewInputBuffer(
const media::BitstreamBuffer& bitstream_buffer) {
- DCHECK_EQ(message_loop_, base::MessageLoop::current());
+ DCHECK_EQ(io_message_loop_, base::MessageLoop::current());
TRACE_EVENT1("Video Decoder", "MapAndQueueNewInputBuffer", "input_id",
bitstream_buffer.id());
@@ -646,7 +647,7 @@ void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() {
void VaapiVideoDecodeAccelerator::Decode(
const media::BitstreamBuffer& bitstream_buffer) {
- DCHECK_EQ(message_loop_, base::MessageLoop::current());
+ DCHECK_EQ(io_message_loop_, base::MessageLoop::current());
TRACE_EVENT1("Video Decoder", "VAVDA::Decode", "Buffer id",
bitstream_buffer.id());

Powered by Google App Engine
This is Rietveld 408576698