| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index 67fef2e01a9906b407e6eeae196e0c76ac27d48d..ae543a3e207deae1015580ce5e0d09d84f6aed96 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -219,6 +219,8 @@ void ThreadProxy::SetOutputSurface(scoped_ptr<OutputSurface> output_surface) {
|
|
|
| scoped_ptr<OutputSurface> ThreadProxy::ReleaseOutputSurface() {
|
| DCHECK(IsMainThread());
|
| + DCHECK(layer_tree_host()->output_surface_lost());
|
| +
|
| DebugScopedSetMainThreadBlocked main_thread_blocked(this);
|
| CompletionEvent completion;
|
| scoped_ptr<OutputSurface> output_surface;
|
| @@ -227,7 +229,7 @@ scoped_ptr<OutputSurface> ThreadProxy::ReleaseOutputSurface() {
|
| base::Bind(&ThreadProxy::ReleaseOutputSurfaceOnImplThread,
|
| impl_thread_weak_ptr_, &completion, &output_surface));
|
| completion.Wait();
|
| - return output_surface.Pass();
|
| + return output_surface;
|
| }
|
|
|
| void ThreadProxy::DidInitializeOutputSurface(
|
| @@ -1083,9 +1085,10 @@ void ThreadProxy::InitializeOutputSurfaceOnImplThread(
|
| void ThreadProxy::ReleaseOutputSurfaceOnImplThread(
|
| CompletionEvent* completion,
|
| scoped_ptr<OutputSurface>* output_surface) {
|
| - TRACE_EVENT0("cc", "ThreadProxy::ReleaseOutputSurfaceOnImplThread");
|
| DCHECK(IsImplThread());
|
|
|
| + // Unlike DidLoseOutputSurfaceOnImplThread, we don't need to call
|
| + // LayerTreeHost::DidLoseOutputSurface since it already knows.
|
| impl().scheduler->DidLoseOutputSurface();
|
| *output_surface = impl().layer_tree_host_impl->ReleaseOutputSurface();
|
| completion->Signal();
|
|
|