| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/layer.h" | 5 #include "cc/layers/layer.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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 #else | 1127 #else |
| 1128 layer->SetDebugInfo(TakeDebugInfo()); | 1128 layer->SetDebugInfo(TakeDebugInfo()); |
| 1129 #endif | 1129 #endif |
| 1130 | 1130 |
| 1131 layer->SetTransformTreeIndex(transform_tree_index()); | 1131 layer->SetTransformTreeIndex(transform_tree_index()); |
| 1132 layer->SetEffectTreeIndex(effect_tree_index()); | 1132 layer->SetEffectTreeIndex(effect_tree_index()); |
| 1133 layer->SetClipTreeIndex(clip_tree_index()); | 1133 layer->SetClipTreeIndex(clip_tree_index()); |
| 1134 layer->SetScrollTreeIndex(scroll_tree_index()); | 1134 layer->SetScrollTreeIndex(scroll_tree_index()); |
| 1135 layer->set_offset_to_transform_parent(offset_to_transform_parent_); | 1135 layer->set_offset_to_transform_parent(offset_to_transform_parent_); |
| 1136 layer->SetDrawsContent(DrawsContent()); | 1136 layer->SetDrawsContent(DrawsContent()); |
| 1137 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); | |
| 1138 // subtree_property_changed_ is propagated to all descendants while building | 1137 // subtree_property_changed_ is propagated to all descendants while building |
| 1139 // property trees. So, it is enough to check it only for the current layer. | 1138 // property trees. So, it is enough to check it only for the current layer. |
| 1140 if (subtree_property_changed_) | 1139 if (subtree_property_changed_) |
| 1141 layer->NoteLayerPropertyChanged(); | 1140 layer->NoteLayerPropertyChanged(); |
| 1142 if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating()) | 1141 if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating()) |
| 1143 layer->SetFilters(filters_); | 1142 layer->SetFilters(filters_); |
| 1144 DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly())); | 1143 DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly())); |
| 1145 layer->SetBackgroundFilters(background_filters()); | 1144 layer->SetBackgroundFilters(background_filters()); |
| 1146 layer->SetMasksToBounds(masks_to_bounds_); | 1145 layer->SetMasksToBounds(masks_to_bounds_); |
| 1147 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_); | 1146 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 ->data.num_copy_requests_in_subtree; | 1752 ->data.num_copy_requests_in_subtree; |
| 1754 } | 1753 } |
| 1755 | 1754 |
| 1756 gfx::Transform Layer::screen_space_transform() const { | 1755 gfx::Transform Layer::screen_space_transform() const { |
| 1757 DCHECK_NE(transform_tree_index_, -1); | 1756 DCHECK_NE(transform_tree_index_, -1); |
| 1758 return draw_property_utils::ScreenSpaceTransform( | 1757 return draw_property_utils::ScreenSpaceTransform( |
| 1759 this, layer_tree_host_->property_trees()->transform_tree); | 1758 this, layer_tree_host_->property_trees()->transform_tree); |
| 1760 } | 1759 } |
| 1761 | 1760 |
| 1762 } // namespace cc | 1761 } // namespace cc |
| OLD | NEW |