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

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: Offset 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
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0763fc7533ef60eba3099bc4dd5f1b7ec076a6f2 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -509,6 +509,9 @@ bool LayerTreeImpl::UpdateDrawProperties() {
settings().minimum_occlusion_tracking_size);
}
+ bool resourceless_software_draw = (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 +530,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,
+ resourceless_software_draw);
+ }
if (!it.represents_contributing_render_surface()) {
if (occlusion_tracker)
@@ -536,11 +541,14 @@ 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,
+ resourceless_software_draw);
+ }
+ if (layer->replica_layer() && layer->replica_layer()->mask_layer()) {
layer->replica_layer()->mask_layer()->UpdateTiles(
- occlusion_in_content_space);
+ occlusion_in_content_space, resourceless_software_draw);
+ }
if (occlusion_tracker)
occlusion_tracker->LeaveLayer(it);
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698