Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 870b65d89ba7b123085028c34359d4afbf122131..aea7e332a69cc058c75f10574fc9891a81876833 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -169,6 +169,7 @@ LayerTreeHostImpl::LayerTreeHostImpl( |
RenderingStatsInstrumentation* rendering_stats_instrumentation) |
: client_(client), |
proxy_(proxy), |
+ output_surface_lost_(true), |
input_handler_client_(NULL), |
did_lock_scrolling_layer_(false), |
should_bubble_scrolls_(false), |
@@ -1347,7 +1348,7 @@ const RendererCapabilities& LayerTreeHostImpl::GetRendererCapabilities() const { |
} |
bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) { |
- if (frame.has_no_damage) |
+ if (frame.has_no_damage || output_surface_lost_) |
Sami
2013/08/30 13:49:06
Could you explain why we'd need to avoid swapping
brianderson
2013/09/03 22:51:47
This was a change I pulled in from the big patch "
|
return false; |
renderer_->SwapBuffers(); |
active_tree_->ClearLatencyInfo(); |
@@ -1390,6 +1391,7 @@ void LayerTreeHostImpl::DidLoseOutputSurface() { |
// TODO(jamesr): The renderer_ check is needed to make some of the |
// LayerTreeHostContextTest tests pass, but shouldn't be necessary (or |
// important) in production. We should adjust the test to not need this. |
+ output_surface_lost_ = true; |
if (renderer_) |
client_->DidLoseOutputSurfaceOnImplThread(); |
} |
@@ -1624,6 +1626,7 @@ bool LayerTreeHostImpl::InitializeRenderer( |
tile_manager_.reset(); |
resource_provider_.reset(); |
output_surface_.reset(); |
+ output_surface_lost_ = true; |
if (!output_surface->BindToClient(this)) |
return false; |
@@ -1669,6 +1672,7 @@ bool LayerTreeHostImpl::InitializeRenderer( |
resource_provider_ = resource_provider.Pass(); |
output_surface_ = output_surface.Pass(); |
+ output_surface_lost_ = false; |
client_->OnCanDrawStateChanged(CanDraw()); |