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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.h

Issue 2076423004: Remove calls to MessageLoop::current() in media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 years, 6 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
« no previous file with comments | « media/gpu/v4l2_video_encode_accelerator.cc ('k') | media/gpu/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vaapi_video_decode_accelerator.h
diff --git a/media/gpu/vaapi_video_decode_accelerator.h b/media/gpu/vaapi_video_decode_accelerator.h
index f9144fc89c9e28cd1ae9acbca002f5a17b56900f..819537f03f4170d2fb8281c874eef390e772467a 100644
--- a/media/gpu/vaapi_video_decode_accelerator.h
+++ b/media/gpu/vaapi_video_decode_accelerator.h
@@ -21,8 +21,9 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread.h"
@@ -261,8 +262,8 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
typedef base::Callback<void(VaapiPicture*)> OutputCB;
std::queue<OutputCB> pending_output_cbs_;
- // ChildThread's message loop
- base::MessageLoop* message_loop_;
+ // ChildThread's task runner.
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// WeakPtr<> pointing to |this| for use in posting tasks from the decoder
// thread back to the ChildThread. Because the decoder thread is a member of
@@ -276,7 +277,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
VASurface::ReleaseCB va_surface_release_cb_;
// To expose client callbacks from VideoDecodeAccelerator.
- // NOTE: all calls to these objects *MUST* be executed on message_loop_.
+ // NOTE: all calls to these objects *MUST* be executed on task_runner_.
std::unique_ptr<base::WeakPtrFactory<Client>> client_ptr_factory_;
base::WeakPtr<Client> client_;
« no previous file with comments | « media/gpu/v4l2_video_encode_accelerator.cc ('k') | media/gpu/vaapi_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698