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

Unified Diff: cc/trees/thread_proxy.cc

Issue 85693007: cc: Defer first OutputSurface creation until client is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add tests Created 7 years, 1 month 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
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 89a6773ef38d8bd94fff36ecaf528e046124a866..6b1ecbcf225aaeee215a972b0b1ca7e9088a2078 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -247,9 +247,8 @@ void ThreadProxy::DoCreateAndInitializeOutputSurface() {
TRACE_EVENT0("cc", "ThreadProxy::DoCreateAndInitializeOutputSurface");
DCHECK(IsMainThread());
- scoped_ptr<OutputSurface> output_surface = first_output_surface_.Pass();
- if (!output_surface)
- output_surface = layer_tree_host()->CreateOutputSurface();
+ scoped_ptr<OutputSurface> output_surface =
+ layer_tree_host()->CreateOutputSurface();
RendererCapabilities capabilities;
bool success = !!output_surface;
@@ -622,10 +621,9 @@ ThreadProxy::contents_texture_manager_on_impl_thread() {
return contents_texture_manager_unsafe_;
}
-void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
+void ThreadProxy::Start() {
DCHECK(IsMainThread());
DCHECK(Proxy::HasImplThread());
- DCHECK(first_output_surface);
// Create LayerTreeHostImpl.
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
@@ -638,7 +636,6 @@ void ThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
completion.Wait();
main_thread_weak_ptr_ = weak_factory_.GetWeakPtr();
- first_output_surface_ = first_output_surface.Pass();
started_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698