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

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: 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
Index: cc/layer_tree_impl.cc
diff --git a/cc/layer_tree_impl.cc b/cc/layer_tree_impl.cc
index 832ecaa84d1da7fe6abe6172d483d6215d2b4d67..088cf86363a40bd4fdddf08bcc4a3c319c325a3b 100644
--- a/cc/layer_tree_impl.cc
+++ b/cc/layer_tree_impl.cc
@@ -28,6 +28,7 @@ LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl)
scrolling_layer_id_from_previous_tree_(0),
contents_textures_purged_(false),
needs_update_draw_properties_(true),
+ needs_update_tile_priorities_(false),
needs_full_tree_sync_(true) {
}
@@ -213,13 +214,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);
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.
@@ -249,6 +254,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') | cc/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698