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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 616543004: cc: Use visible_rect_for_tile_priority_ where approriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UpdateTiles Created 6 years, 3 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 ea9c1d012f14c9097bbd0dd3b262de1dfe1696bc..6c8b3659b1333ceb54ab910f6c4808b4598a180c 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -509,6 +509,10 @@ bool LayerTreeImpl::UpdateDrawProperties() {
settings().minimum_occlusion_tracking_size);
}
+ bool draw_properties_valid_for_tile_priority =
+ (layer_tree_host_impl_->GetDrawMode() !=
+ DRAW_MODE_RESOURCELESS_SOFTWARE);
+
// LayerIterator is used here instead of CallFunctionForSubtree to only
// UpdateTilePriorities on layers that will be visible (and thus have valid
// draw properties) and not because any ordering is required.
@@ -527,8 +531,10 @@ bool LayerTreeImpl::UpdateDrawProperties() {
layer->draw_transform())
: Occlusion();
- if (it.represents_itself())
- layer->UpdateTiles(occlusion_in_content_space);
+ if (it.represents_itself()) {
+ layer->UpdateTiles(occlusion_in_content_space,
+ draw_properties_valid_for_tile_priority);
+ }
if (!it.represents_contributing_render_surface()) {
if (occlusion_tracker)
@@ -536,11 +542,16 @@ bool LayerTreeImpl::UpdateDrawProperties() {
continue;
}
- if (layer->mask_layer())
- layer->mask_layer()->UpdateTiles(occlusion_in_content_space);
- if (layer->replica_layer() && layer->replica_layer()->mask_layer())
+ if (layer->mask_layer()) {
+ layer->mask_layer()->UpdateTiles(
+ occlusion_in_content_space,
+ draw_properties_valid_for_tile_priority);
+ }
+ if (layer->replica_layer() && layer->replica_layer()->mask_layer()) {
layer->replica_layer()->mask_layer()->UpdateTiles(
- occlusion_in_content_space);
+ occlusion_in_content_space,
+ draw_properties_valid_for_tile_priority);
+ }
if (occlusion_tracker)
occlusion_tracker->LeaveLayer(it);
« cc/layers/picture_layer_impl_unittest.cc ('K') | « cc/resources/tile_manager_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698