| Index: cc/trees/single_thread_proxy.cc
|
| diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
|
| index 0386145c7c55fea08e4f34362dd5f3536b1b1a02..469996e4b70d9ff09ffb09bf092f13b40031df94 100644
|
| --- a/cc/trees/single_thread_proxy.cc
|
| +++ b/cc/trees/single_thread_proxy.cc
|
| @@ -425,7 +425,12 @@ void SingleThreadProxy::DidReceiveCompositorFrameAckOnImplThread() {
|
| "SingleThreadProxy::DidReceiveCompositorFrameAckOnImplThread");
|
| if (scheduler_on_impl_thread_)
|
| scheduler_on_impl_thread_->DidReceiveCompositorFrameAck();
|
| - layer_tree_host_->DidReceiveCompositorFrameAck();
|
| + // We do a PostTask here because freeing resources in some cases (such as in
|
| + // TextureLayer) is PostTasked and we want to make sure ack is received after
|
| + // resources are returned.
|
| + task_runner_provider_->MainThreadTaskRunner()->PostTask(
|
| + FROM_HERE, base::Bind(&SingleThreadProxy::DidReceiveCompositorFrameAck,
|
| + weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| void SingleThreadProxy::OnDrawForCompositorFrameSink(
|
| @@ -794,4 +799,8 @@ void SingleThreadProxy::DidFinishImplFrame() {
|
| #endif
|
| }
|
|
|
| +void SingleThreadProxy::DidReceiveCompositorFrameAck() {
|
| + layer_tree_host_->DidReceiveCompositorFrameAck();
|
| +}
|
| +
|
| } // namespace cc
|
|
|