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); |
} |