| Index: cc/trees/thread_proxy.cc
|
| diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
|
| index f61e7feb73e826b4b2ae6067c29a6ffd0b6a41fa..a33bb9acd74e9ead4236aa044e57ded9a9e2b7f2 100644
|
| --- a/cc/trees/thread_proxy.cc
|
| +++ b/cc/trees/thread_proxy.cc
|
| @@ -1164,13 +1164,26 @@ void ThreadProxy::InitializeOutputSurfaceOnImplThread(
|
|
|
| *success = layer_tree_host_impl_->InitializeRenderer(output_surface.Pass());
|
|
|
| + DidTryInitializeRendererOnImplThread(*success, offscreen_context_provider);
|
| +
|
| + if (*success)
|
| + *capabilities = layer_tree_host_impl_->GetRendererCapabilities();
|
| +
|
| + completion->Signal();
|
| +}
|
| +
|
| +void ThreadProxy::DidTryInitializeRendererOnImplThread(
|
| + bool success,
|
| + scoped_refptr<ContextProvider> offscreen_context_provider) {
|
| + DCHECK(IsImplThread());
|
| +
|
| if (offscreen_context_provider.get())
|
| offscreen_context_provider->BindToCurrentThread();
|
|
|
| - if (*success) {
|
| - *capabilities = layer_tree_host_impl_->GetRendererCapabilities();
|
| + if (success) {
|
| scheduler_on_impl_thread_->SetSwapBuffersCompleteSupported(
|
| - capabilities->using_swap_complete_callback);
|
| + layer_tree_host_impl_->GetRendererCapabilities()
|
| + .using_swap_complete_callback);
|
|
|
| OutputSurface* output_surface_ptr = layer_tree_host_impl_->output_surface();
|
| DCHECK(output_surface_ptr);
|
| @@ -1191,8 +1204,6 @@ void ThreadProxy::InitializeOutputSurfaceOnImplThread(
|
| } else if (offscreen_context_provider.get()) {
|
| offscreen_context_provider->VerifyContexts();
|
| }
|
| -
|
| - completion->Signal();
|
| }
|
|
|
| void ThreadProxy::FinishGLOnImplThread(CompletionEvent* completion) {
|
|
|