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

Unified Diff: cc/layer_tree_impl.cc

Issue 12212156: cc: Only allow trees created at the current viewport size to draw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits and rebase to 182333 Created 7 years, 10 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/layer_tree_impl.h ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698