Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: cc/trees/thread_proxy.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/trees/layer_tree_host_unittest.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
danakj 2013/06/06 14:49:31 This stuff is meant to happen when the output surf
boliu 2013/06/06 17:39:25 Also expanding the question to SetSwapBuffersCompl
danakj 2013/06/06 17:53:39 I really like the idea of DCHECK () << "You cant d
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) {
« cc/trees/layer_tree_host_unittest.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698