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

Unified Diff: cc/trees/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: Add early-out and unit test Created 7 years, 8 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/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index f02f01d0eecfce7c9b41b4160e49155d9559efea..10197320bed0f4b9a5c8a0dc5f29988f14dd417d 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -258,13 +258,7 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
}
}
-struct UpdateTilePrioritiesForLayer {
- void operator()(LayerImpl *layer) {
- layer->UpdateTilePriorities();
- }
-};
-
-void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
+void LayerTreeImpl::UpdateDrawProperties() {
if (IsActiveTree() && RootScrollLayer() && RootClipLayer())
UpdateRootScrollLayerSizeDelta();
@@ -281,13 +275,6 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
RootClipLayer()->SetMasksToBounds(false);
}
- if (!needs_update_draw_properties_) {
- if (reason == UPDATE_ACTIVE_TREE_FOR_DRAW && root_layer())
- LayerTreeHostCommon::CallFunctionForSubtree<UpdateTilePrioritiesForLayer>(
- root_layer());
- return;
- }
-
needs_update_draw_properties_ = false;
render_surface_layer_list_.clear();
@@ -303,9 +290,6 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
"LayerTreeImpl::UpdateDrawProperties",
"IsActive",
IsActiveTree());
- bool update_tile_priorities =
- reason == UPDATE_PENDING_TREE ||
- reason == UPDATE_ACTIVE_TREE_FOR_DRAW;
LayerTreeHostCommon::CalculateDrawProperties(
root_layer(),
device_viewport_size(),
@@ -314,12 +298,11 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
root_scroll_layer_,
MaxTextureSize(),
settings().can_use_lcd_text,
- &render_surface_layer_list_,
- update_tile_priorities);
+ &render_surface_layer_list_);
}
DCHECK(!needs_update_draw_properties_) <<
- "calcDrawProperties should not set_needs_update_draw_properties()";
+ "CalcDrawProperties should not set_needs_update_draw_properties()";
}
static void ClearRenderSurfacesOnLayerImplRecursive(LayerImpl* current) {

Powered by Google App Engine
This is Rietveld 408576698