| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index 9fac98bb3490af63272a63cdcee171987260f85d..e2ef24141b0c498bc7d2b392796e7392e28e8137 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -217,6 +217,20 @@ void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) {
|
| impl_thread_weak_ptr_, base::Passed(&output_surface)));
|
| }
|
|
|
| +scoped_ptr<OutputSurface> ThreadProxy::ReleaseOutputSurface() {
|
| + DCHECK(IsMainThread());
|
| +
|
| + DebugScopedSetMainThreadBlocked main_thread_blocked(this);
|
| + CompletionEvent completion;
|
| + scoped_ptr<OutputSurface> output_surface;
|
| + Proxy::ImplThreadTaskRunner()->PostTask(
|
| + FROM_HERE, base::Bind(&ThreadProxy::ReleaseOutputSurfaceOnImplThread,
|
| + impl_thread_weak_ptr_, &completion,
|
| + base::Passed(&output_surface)));
|
| + completion.Wait();
|
| + return output_surface.Pass();
|
| +}
|
| +
|
| void ThreadProxy::DidInitializeOutputSurface(
|
| bool success,
|
| const RendererCapabilities& capabilities) {
|
| @@ -1082,6 +1096,17 @@ void ThreadProxy::InitializeOutputSurfaceOnImplThread(
|
| impl().scheduler->DidCreateAndInitializeOutputSurface();
|
| }
|
|
|
| +void ThreadProxy::ReleaseOutputSurfaceOnImplThread(
|
| + CompletionEvent* completion,
|
| + scoped_ptr<OutputSurface> output_surface) {
|
| + TRACE_EVENT0("cc", "ThreadProxy::ReleaseOutputSurfaceOnImplThread");
|
| + DCHECK(IsImplThread());
|
| +
|
| + impl().scheduler->DidLoseOutputSurface();
|
| + output_surface = impl().layer_tree_host_impl->ReleaseOutputSurface();
|
| + completion->Signal();
|
| +}
|
| +
|
| void ThreadProxy::FinishGLOnImplThread(CompletionEvent* completion) {
|
| TRACE_EVENT0("cc", "ThreadProxy::FinishGLOnImplThread");
|
| DCHECK(IsImplThread());
|
|
|