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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 2036ed0ea552781578d2a538666863839a1aa08a..f1b9b29586f60a0b329e1cd126835160a5b342d3 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -14,7 +14,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/sequence_checker.h"
#include "base/synchronization/condition_variable.h"
#include "base/threading/thread.h"
@@ -956,12 +955,13 @@ bool InProcessCommandBuffer::Initialize() {
namespace {
-void PostCallback(const scoped_refptr<base::MessageLoopProxy>& loop,
- const base::Closure& callback) {
- // The loop.get() check is to support using InProcessCommandBuffer on a thread
- // without a message loop.
- if (loop.get() && !loop->BelongsToCurrentThread()) {
- loop->PostTask(FROM_HERE, callback);
+void PostCallback(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ const base::Closure& callback) {
+ // The task_runner.get() check is to support using InProcessCommandBuffer on a
+ // thread without a message loop.
+ if (task_runner.get() && !task_runner->BelongsToCurrentThread()) {
+ task_runner->PostTask(FROM_HERE, callback);
} else {
callback.Run();
}
@@ -982,7 +982,7 @@ base::Closure InProcessCommandBuffer::WrapCallback(
base::Closure callback_on_client_thread =
base::Bind(&RunOnTargetThread, base::Passed(&scoped_callback));
base::Closure wrapped_callback =
- base::Bind(&PostCallback, base::MessageLoopProxy::current(),
+ base::Bind(&PostCallback, base::MessageLoop::current()->task_runner(),
callback_on_client_thread);
return wrapped_callback;
}
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698