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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 2899403003: cc: Give non-drawing layers that are rasterized a lower priority. (Closed)
Patch Set: .. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 1172
1173 // Resourceless draw do not need tiles and should not affect existing tile 1173 // Resourceless draw do not need tiles and should not affect existing tile
1174 // priorities. 1174 // priorities.
1175 if (!is_in_resourceless_software_draw_mode()) { 1175 if (!is_in_resourceless_software_draw_mode()) {
1176 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", 1176 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles",
1177 "IsActive", IsActiveTree(), "SourceFrameNumber", 1177 "IsActive", IsActiveTree(), "SourceFrameNumber",
1178 source_frame_number_); 1178 source_frame_number_);
1179 size_t layers_updated_count = 0; 1179 size_t layers_updated_count = 0;
1180 bool tile_priorities_updated = false; 1180 bool tile_priorities_updated = false;
1181 for (PictureLayerImpl* layer : picture_layers_) { 1181 for (PictureLayerImpl* layer : picture_layers_) {
1182 if (!layer->contributes_to_drawn_render_surface()) 1182 if (!layer->HasValidTilePriorities())
1183 continue; 1183 continue;
1184 ++layers_updated_count; 1184 ++layers_updated_count;
1185 tile_priorities_updated |= layer->UpdateTiles(); 1185 tile_priorities_updated |= layer->UpdateTiles();
1186 } 1186 }
1187 1187
1188 if (tile_priorities_updated) 1188 if (tile_priorities_updated)
1189 DidModifyTilePriorities(); 1189 DidModifyTilePriorities();
1190 1190
1191 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", 1191 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles",
1192 "layers_updated_count", layers_updated_count); 1192 "layers_updated_count", layers_updated_count);
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 2134
2135 void LayerTreeImpl::ResetAllChangeTracking() { 2135 void LayerTreeImpl::ResetAllChangeTracking() {
2136 layers_that_should_push_properties_.clear(); 2136 layers_that_should_push_properties_.clear();
2137 // Iterate over all layers, including masks. 2137 // Iterate over all layers, including masks.
2138 for (auto& layer : *layers_) 2138 for (auto& layer : *layers_)
2139 layer->ResetChangeTracking(); 2139 layer->ResetChangeTracking();
2140 property_trees_.ResetAllChangeTracking(); 2140 property_trees_.ResetAllChangeTracking();
2141 } 2141 }
2142 2142
2143 } // namespace cc 2143 } // namespace cc
OLDNEW
« cc/layers/picture_layer_impl.cc ('K') | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698