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; |
} |