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

Unified Diff: cc/layer_tree_impl.cc

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid project more agressively. Don't save state for tile prio if we didn't compute tile prio. 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/picture_layer_impl.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 b0d071efd64d7bf84ccca61ad9c15dd0fc246474..c3cb7089b3046d9a90814bf695a5d9dbd15dd423 100644
--- a/cc/layer_tree_impl.cc
+++ b/cc/layer_tree_impl.cc
@@ -29,6 +29,7 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
contents_textures_purged_(false),
viewport_size_invalid_(false),
needs_update_draw_properties_(true),
+ needs_update_tile_priorities_(false),
needs_full_tree_sync_(true) {
}
@@ -219,13 +220,17 @@ struct UpdateTilePrioritiesForLayer {
void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
if (!needs_update_draw_properties_) {
- if (reason == UPDATE_ACTIVE_TREE_FOR_DRAW && RootLayer())
+ if (needs_update_tile_priorities_ && RootLayer()) {
+ DCHECK_EQ(UPDATE_ACTIVE_TREE_FOR_DRAW, reason);
enne (OOO) 2013/03/04 20:16:39 The change that added this UpdateDrawProperties re
LayerTreeHostCommon::callFunctionForSubtree<UpdateTilePrioritiesForLayer>(
RootLayer());
+ needs_update_tile_priorities_ = false;
+ }
return;
}
needs_update_draw_properties_ = false;
+ needs_update_tile_priorities_ = true;
render_surface_layer_list_.clear();
// For maxTextureSize.
@@ -255,6 +260,9 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
settings().canUseLCDText,
render_surface_layer_list_,
update_tile_priorities);
+
+ if (update_tile_priorities)
+ needs_update_tile_priorities_ = false;
}
DCHECK(!needs_update_draw_properties_) <<
« no previous file with comments | « cc/layer_tree_impl.h ('k') | cc/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698