| Index: cc/layers/texture_layer.cc
|
| diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
|
| index d09963139101e955de76cb914513e31d51777b6f..7e89bb9c15fd66b49a6095d7641e7116ebc22bef 100644
|
| --- a/cc/layers/texture_layer.cc
|
| +++ b/cc/layers/texture_layer.cc
|
| @@ -4,7 +4,8 @@
|
|
|
| #include "cc/layers/texture_layer.h"
|
|
|
| -#include "cc/base/thread.h"
|
| +#include "base/location.h"
|
| +#include "base/single_thread_task_runner.h"
|
| #include "cc/layers/texture_layer_client.h"
|
| #include "cc/layers/texture_layer_impl.h"
|
| #include "cc/trees/layer_tree_host.h"
|
| @@ -22,13 +23,14 @@ void RunCallback(
|
| }
|
|
|
| void PostCallbackToThread(
|
| - Thread* thread,
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| const TextureMailbox::ReleaseCallback& callback,
|
| unsigned sync_point,
|
| bool lost_resource) {
|
| if (!callback.is_null()) {
|
| - thread->PostTask(base::Bind(&RunCallback, callback,
|
| - sync_point, lost_resource));
|
| + task_runner->PostTask(FROM_HERE,
|
| + base::Bind(&RunCallback, callback,
|
| + sync_point, lost_resource));
|
| }
|
| }
|
|
|
| @@ -214,9 +216,12 @@ void TextureLayer::PushPropertiesTo(LayerImpl* layer) {
|
| texture_layer->set_vertex_opacity(vertex_opacity_);
|
| texture_layer->set_premultiplied_alpha(premultiplied_alpha_);
|
| if (uses_mailbox_ && own_mailbox_) {
|
| - Thread* main_thread = layer_tree_host()->proxy()->MainThread();
|
| + scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner =
|
| + layer_tree_host()->proxy()->MainThreadTaskRunner();
|
| TextureMailbox::ReleaseCallback callback = base::Bind(
|
| - &PostCallbackToThread, main_thread, texture_mailbox_.callback());
|
| + &PostCallbackToThread,
|
| + main_thread_task_runner,
|
| + texture_mailbox_.callback());
|
| texture_layer->SetTextureMailbox(
|
| texture_mailbox_.CopyWithNewCallback(callback));
|
| own_mailbox_ = false;
|
|
|