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

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: priority bin 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 1137
1138 // Resourceless draw do not need tiles and should not affect existing tile 1138 // Resourceless draw do not need tiles and should not affect existing tile
1139 // priorities. 1139 // priorities.
1140 if (!is_in_resourceless_software_draw_mode()) { 1140 if (!is_in_resourceless_software_draw_mode()) {
1141 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", 1141 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles",
1142 "IsActive", IsActiveTree(), "SourceFrameNumber", 1142 "IsActive", IsActiveTree(), "SourceFrameNumber",
1143 source_frame_number_); 1143 source_frame_number_);
1144 size_t layers_updated_count = 0; 1144 size_t layers_updated_count = 0;
1145 bool tile_priorities_updated = false; 1145 bool tile_priorities_updated = false;
1146 for (PictureLayerImpl* layer : picture_layers_) { 1146 for (PictureLayerImpl* layer : picture_layers_) {
1147 if (!layer->contributes_to_drawn_render_surface()) 1147 if (!layer->HasValidTilePriorities())
danakj 2017/05/25 15:49:02 Is there a test for this?
Khushal 2017/05/25 22:43:23 Done. UpdatedTilingsForNonDrawingLayers.
1148 continue; 1148 continue;
1149 ++layers_updated_count; 1149 ++layers_updated_count;
1150 tile_priorities_updated |= layer->UpdateTiles(); 1150 tile_priorities_updated |= layer->UpdateTiles();
1151 } 1151 }
1152 1152
1153 if (tile_priorities_updated) 1153 if (tile_priorities_updated)
1154 DidModifyTilePriorities(); 1154 DidModifyTilePriorities();
1155 1155
1156 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", 1156 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles",
1157 "layers_updated_count", layers_updated_count); 1157 "layers_updated_count", layers_updated_count);
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 2117
2118 void LayerTreeImpl::ResetAllChangeTracking() { 2118 void LayerTreeImpl::ResetAllChangeTracking() {
2119 layers_that_should_push_properties_.clear(); 2119 layers_that_should_push_properties_.clear();
2120 // Iterate over all layers, including masks. 2120 // Iterate over all layers, including masks.
2121 for (auto& layer : *layers_) 2121 for (auto& layer : *layers_)
2122 layer->ResetChangeTracking(); 2122 layer->ResetChangeTracking();
2123 property_trees_.ResetAllChangeTracking(); 2123 property_trees_.ResetAllChangeTracking();
2124 } 2124 }
2125 2125
2126 } // namespace cc 2126 } // namespace cc
OLDNEW
« cc/tiles/tiling_set_raster_queue_all.h ('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