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

Unified Diff: ui/gl/gl_surface_glx.cc

Issue 516173002: ui: Replace MessageLoopProxy usage with ThreadTaskRunnerHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 05ab13bec182f93bedcd1651bcb2f975811470de..b131b380a61dbcaf2b257b0a18a6844732164200 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -15,8 +15,10 @@ extern "C" {
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/cancellation_flag.h"
#include "base/synchronization/lock.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
@@ -128,7 +130,7 @@ class SGIVideoSyncProviderThreadShim {
explicit SGIVideoSyncProviderThreadShim(XID window)
: window_(window),
context_(NULL),
- message_loop_(base::MessageLoopProxy::current()),
+ task_runner_(base::ThreadTaskRunnerHandle::Get()),
cancel_vsync_flag_(),
vsync_lock_() {
// This ensures that creation of |window_| has occured when this shim
@@ -204,7 +206,7 @@ class SGIVideoSyncProviderThreadShim {
const base::TimeDelta kDefaultInterval =
base::TimeDelta::FromSeconds(1) / 60;
- message_loop_->PostTask(
+ task_runner_->PostTask(
FROM_HERE, base::Bind(callback, now, kDefaultInterval));
}
@@ -218,7 +220,7 @@ class SGIVideoSyncProviderThreadShim {
XID window_;
GLXContext context_;
- scoped_refptr<base::MessageLoopProxy> message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
base::CancellationFlag cancel_vsync_flag_;
base::Lock vsync_lock_;
« ui/events/test/event_generator.cc ('K') | « ui/gl/android/surface_texture_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698