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

Unified Diff: cc/trees/layer_tree_host_common.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_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 2fb5fe1e0a68cae68c27611771d2f687f6b6da62..bc4ae9f5ff4aa931352c4a03113bf2fab3b6fea8 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -782,8 +782,7 @@ static void CalculateDrawPropertiesInternal(
LayerType* page_scale_application_layer,
bool in_subtree_of_page_scale_application_layer,
bool subtree_can_use_lcd_text,
- gfx::Rect* drawable_content_rect_of_subtree,
- bool update_tile_priorities) {
+ gfx::Rect* drawable_content_rect_of_subtree) {
// This function computes the new matrix transformations recursively for this
// layer and all its descendants. It also computes the appropriate render
// surfaces.
@@ -1282,8 +1281,7 @@ static void CalculateDrawPropertiesInternal(
page_scale_application_layer,
in_subtree_of_page_scale_application_layer,
subtree_can_use_lcd_text,
- &drawable_content_rect_of_child_subtree,
- update_tile_priorities);
+ &drawable_content_rect_of_child_subtree);
if (!drawable_content_rect_of_child_subtree.IsEmpty()) {
accumulated_drawable_content_rect_of_children.Union(
drawable_content_rect_of_child_subtree);
@@ -1417,8 +1415,7 @@ static void CalculateDrawPropertiesInternal(
}
}
- if (update_tile_priorities)
- UpdateTilePrioritiesForLayer(layer);
+ UpdateTilePrioritiesForLayer(layer);
// If neither this layer nor any of its children were added, early out.
if (sorting_start_index == descendants.size())
@@ -1469,7 +1466,6 @@ void LayerTreeHostCommon::CalculateDrawProperties(
// initial clip rect.
bool subtree_should_be_clipped = true;
gfx::Rect device_viewport_rect(device_viewport_size);
- bool update_tile_priorities = false;
bool in_subtree_of_page_scale_application_layer = false;
// This function should have received a root layer.
@@ -1495,8 +1491,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
page_scale_application_layer,
in_subtree_of_page_scale_application_layer,
can_use_lcd_text,
- &total_drawable_content_rect,
- update_tile_priorities);
+ &total_drawable_content_rect);
// The dummy layer list should not have been used.
DCHECK_EQ(0u, dummy_layer_list.size());
@@ -1513,8 +1508,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
LayerImpl* page_scale_application_layer,
int max_texture_size,
bool can_use_lcd_text,
- LayerImplList* render_surface_layer_list,
- bool update_tile_priorities) {
+ LayerImplList* render_surface_layer_list) {
gfx::Rect total_drawable_content_rect;
gfx::Transform identity_matrix;
gfx::Transform device_scale_transform;
@@ -1553,8 +1547,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
page_scale_application_layer,
in_subtree_of_page_scale_application_layer,
can_use_lcd_text,
- &total_drawable_content_rect,
- update_tile_priorities);
+ &total_drawable_content_rect);
// The dummy layer list should not have been used.
DCHECK_EQ(0u, dummy_layer_list.size());

Powered by Google App Engine
This is Rietveld 408576698