| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 // determine if the raster source needs to be replaced with a non-lcd | 1015 // determine if the raster source needs to be replaced with a non-lcd |
| 1016 // raster source due to draw properties. | 1016 // raster source due to draw properties. |
| 1017 if (update_lcd_text) { | 1017 if (update_lcd_text) { |
| 1018 // TODO(enne): Make LTHI::sync_tree return this value. | 1018 // TODO(enne): Make LTHI::sync_tree return this value. |
| 1019 LayerTreeImpl* sync_tree = layer_tree_host_impl_->CommitToActiveTree() | 1019 LayerTreeImpl* sync_tree = layer_tree_host_impl_->CommitToActiveTree() |
| 1020 ? layer_tree_host_impl_->active_tree() | 1020 ? layer_tree_host_impl_->active_tree() |
| 1021 : layer_tree_host_impl_->pending_tree(); | 1021 : layer_tree_host_impl_->pending_tree(); |
| 1022 // If this is not the sync tree, then it is not safe to update lcd text | 1022 // If this is not the sync tree, then it is not safe to update lcd text |
| 1023 // as it causes invalidations and the tiles may be in use. | 1023 // as it causes invalidations and the tiles may be in use. |
| 1024 DCHECK_EQ(this, sync_tree); | 1024 DCHECK_EQ(this, sync_tree); |
| 1025 for (const auto& layer : picture_layers_) | 1025 for (auto* layer : picture_layers_) |
| 1026 layer->UpdateCanUseLCDTextAfterCommit(); | 1026 layer->UpdateCanUseLCDTextAfterCommit(); |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 // Resourceless draw do not need tiles and should not affect existing tile | 1029 // Resourceless draw do not need tiles and should not affect existing tile |
| 1030 // priorities. | 1030 // priorities. |
| 1031 if (!is_in_resourceless_software_draw_mode()) { | 1031 if (!is_in_resourceless_software_draw_mode()) { |
| 1032 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", | 1032 TRACE_EVENT_BEGIN2("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", |
| 1033 "IsActive", IsActiveTree(), "SourceFrameNumber", | 1033 "IsActive", IsActiveTree(), "SourceFrameNumber", |
| 1034 source_frame_number_); | 1034 source_frame_number_); |
| 1035 size_t layers_updated_count = 0; | 1035 size_t layers_updated_count = 0; |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 | 2012 |
| 2013 void LayerTreeImpl::ResetAllChangeTracking() { | 2013 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2014 layers_that_should_push_properties_.clear(); | 2014 layers_that_should_push_properties_.clear(); |
| 2015 // Iterate over all layers, including masks and replicas. | 2015 // Iterate over all layers, including masks and replicas. |
| 2016 for (auto& layer : *layers_) | 2016 for (auto& layer : *layers_) |
| 2017 layer->ResetChangeTracking(); | 2017 layer->ResetChangeTracking(); |
| 2018 property_trees_.ResetAllChangeTracking(); | 2018 property_trees_.ResetAllChangeTracking(); |
| 2019 } | 2019 } |
| 2020 | 2020 |
| 2021 } // namespace cc | 2021 } // namespace cc |
| OLD | NEW |