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

Unified Diff: cc/trees/thread_proxy.cc

Issue 101573005: Revert of cc: Defer first OutputSurface creation until client is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | 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 f2c3ce893b709ee3f330baf179cde94a96f283d6..89580040bb3e0a53e24b6e5ab9cba0cf7425cbef 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -267,8 +267,9 @@
TRACE_EVENT0("cc", "ThreadProxy::DoCreateAndInitializeOutputSurface");
DCHECK(IsMainThread());
- scoped_ptr<OutputSurface> output_surface =
- layer_tree_host()->CreateOutputSurface();
+ scoped_ptr<OutputSurface> output_surface = first_output_surface_.Pass();
+ if (!output_surface)
+ output_surface = layer_tree_host()->CreateOutputSurface();
RendererCapabilities capabilities;
bool success = !!output_surface;
@@ -641,9 +642,10 @@
return contents_texture_manager_unsafe_;
}
-void ThreadProxy::Start() {
+void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
DCHECK(IsMainThread());
DCHECK(Proxy::HasImplThread());
+ DCHECK(first_output_surface);
// Create LayerTreeHostImpl.
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
@@ -656,6 +658,7 @@
completion.Wait();
main_thread_weak_ptr_ = weak_factory_.GetWeakPtr();
+ first_output_surface_ = first_output_surface.Pass();
started_ = true;
}
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698