Chromium Code Reviews| 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..2028c596bcd619e2b2b3fb4f876a4aa656a77bcc 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,14 @@ 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 |
| +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 |
|
viettrungluu
2016/01/28 21:32:46
nit: Join this line with the next.
|
| // without a message loop. |
| - if (loop.get() && !loop->BelongsToCurrentThread()) { |
| - loop->PostTask(FROM_HERE, callback); |
| + if (task_runner.get() && !task_runner->BelongsToCurrentThread()) { |
| + task_runner->PostTask(FROM_HERE, callback); |
| } else { |
| callback.Run(); |
| } |
| @@ -982,7 +983,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; |
| } |