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

Unified Diff: trunk/src/cc/trees/single_thread_proxy.cc

Issue 103163003: Revert 238458 "cc: Defer first OutputSurface creation until clie..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « trunk/src/cc/trees/single_thread_proxy.h ('k') | trunk/src/cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/trees/single_thread_proxy.cc
===================================================================
--- trunk/src/cc/trees/single_thread_proxy.cc (revision 238469)
+++ trunk/src/cc/trees/single_thread_proxy.cc (working copy)
@@ -44,9 +44,11 @@
<< "Threaded compositing must be enabled to use impl-side painting.";
}
-void SingleThreadProxy::Start() {
+void SingleThreadProxy::Start(scoped_ptr<OutputSurface> first_output_surface) {
+ DCHECK(first_output_surface);
DebugScopedSetImplThread impl(this);
layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
+ first_output_surface_ = first_output_surface.Pass();
}
SingleThreadProxy::~SingleThreadProxy() {
@@ -111,8 +113,9 @@
"cc", "SingleThreadProxy::CreateAndInitializeOutputSurface");
DCHECK(Proxy::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();
if (!output_surface) {
OnOutputSurfaceInitializeAttempted(false);
return;
« no previous file with comments | « trunk/src/cc/trees/single_thread_proxy.h ('k') | trunk/src/cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698