Index: cc/layer_tree_impl.cc |
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc |
index 832ecaa84d1da7fe6abe6172d483d6215d2b4d67..b0d071efd64d7bf84ccca61ad9c15dd0fc246474 100644 |
--- a/cc/layer_tree_impl.cc |
+++ b/cc/layer_tree_impl.cc |
@@ -27,6 +27,7 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl) |
max_page_scale_factor_(0), |
scrolling_layer_id_from_previous_tree_(0), |
contents_textures_purged_(false), |
+ viewport_size_invalid_(false), |
needs_update_draw_properties_(true), |
needs_full_tree_sync_(true) { |
} |
@@ -104,6 +105,11 @@ void LayerTreeImpl::pushPropertiesTo(LayerTreeImpl* target_tree) { |
else |
target_tree->ResetContentsTexturesPurged(); |
+ if (ViewportSizeInvalid()) |
+ target_tree->SetViewportSizeInvalid(); |
+ else |
+ target_tree->ResetViewportSizeInvalid(); |
+ |
if (hud_layer()) |
target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( |
LayerTreeHostCommon::findLayerInSubtree( |
@@ -346,6 +352,20 @@ void LayerTreeImpl::ResetContentsTexturesPurged() { |
layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
} |
+bool LayerTreeImpl::ViewportSizeInvalid() const { |
+ return viewport_size_invalid_; |
+} |
+ |
+void LayerTreeImpl::SetViewportSizeInvalid() { |
+ viewport_size_invalid_ = true; |
+ layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
+} |
+ |
+void LayerTreeImpl::ResetViewportSizeInvalid() { |
+ viewport_size_invalid_ = false; |
+ layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
+} |
+ |
Proxy* LayerTreeImpl::proxy() const { |
return layer_tree_host_impl_->proxy(); |
} |