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

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: Remove the LTI variable 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 141dc063200f9f04fd08c53fcdc06868ea5b61f9..895bef5e923a2e968ab3009b7233427cdf2f7255 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -254,13 +254,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();
@@ -277,13 +271,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();
@@ -305,9 +292,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(),
@@ -315,12 +299,11 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
total_page_scale_factor(),
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