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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 606113003: Revert of Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 78373c769b6058d8bf647b1e8f5579ff81e33225..eed1e5a7e151e74942e0b78d54b96f38a2f2874d 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -413,12 +413,8 @@
client_->DidCommit();
}
-void LayerTreeHost::SetOutputSurface(scoped_ptr<OutputSurface> surface) {
- proxy_->SetOutputSurface(surface.Pass());
-}
-
-void LayerTreeHost::RequestNewOutputSurface() {
- client_->RequestNewOutputSurface(num_failed_recreate_attempts_ >= 4);
+scoped_ptr<OutputSurface> LayerTreeHost::CreateOutputSurface() {
+ return client_->CreateOutputSurface(num_failed_recreate_attempts_ >= 4);
}
scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
@@ -722,13 +718,11 @@
SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
SetLayerTreeHostClientReady();
- if (output_surface_lost_) {
- RequestNewOutputSurface();
- // RequestNewOutputSurface could have synchronously created an output
- // surface, so check again before returning.
- if (output_surface_lost_)
- return;
- }
+
+ if (output_surface_lost_)
+ proxy->CreateAndInitializeOutputSurface();
+ if (output_surface_lost_)
+ return;
proxy->CompositeImmediately(frame_begin_time);
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698