| OLD | NEW |
| 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 Loading... |
| 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()) |
| 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 Loading... |
| 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 |
| OLD | NEW |