Chromium Code Reviews| 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 974 | 974 |
| 975 int Layer::effect_tree_index() const { | 975 int Layer::effect_tree_index() const { |
| 976 if (!layer_tree_host_ || | 976 if (!layer_tree_host_ || |
| 977 layer_tree_host_->property_trees()->sequence_number != | 977 layer_tree_host_->property_trees()->sequence_number != |
| 978 property_tree_sequence_number_) { | 978 property_tree_sequence_number_) { |
| 979 return -1; | 979 return -1; |
| 980 } | 980 } |
| 981 return effect_tree_index_; | 981 return effect_tree_index_; |
| 982 } | 982 } |
| 983 | 983 |
| 984 int Layer::render_target_effect_tree_index() const { | |
| 985 EffectNode* effect_node = | |
| 986 layer_tree_host_->property_trees()->effect_tree.Node(effect_tree_index_); | |
| 987 if (effect_node->render_surface) | |
|
ajuma
2016/07/22 18:29:40
I think this is always null on the main thread sid
sunxd
2016/07/22 20:25:03
Done.
| |
| 988 return effect_node->id; | |
| 989 else | |
| 990 return effect_node->target_id; | |
| 991 } | |
| 992 | |
| 984 void Layer::SetScrollTreeIndex(int index) { | 993 void Layer::SetScrollTreeIndex(int index) { |
| 985 DCHECK(IsPropertyChangeAllowed()); | 994 DCHECK(IsPropertyChangeAllowed()); |
| 986 if (scroll_tree_index_ == index) | 995 if (scroll_tree_index_ == index) |
| 987 return; | 996 return; |
| 988 scroll_tree_index_ = index; | 997 scroll_tree_index_ = index; |
| 989 SetNeedsPushProperties(); | 998 SetNeedsPushProperties(); |
| 990 } | 999 } |
| 991 | 1000 |
| 992 int Layer::scroll_tree_index() const { | 1001 int Layer::scroll_tree_index() const { |
| 993 if (!layer_tree_host_ || | 1002 if (!layer_tree_host_ || |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1843 ->num_copy_requests_in_subtree; | 1852 ->num_copy_requests_in_subtree; |
| 1844 } | 1853 } |
| 1845 | 1854 |
| 1846 gfx::Transform Layer::screen_space_transform() const { | 1855 gfx::Transform Layer::screen_space_transform() const { |
| 1847 DCHECK_NE(transform_tree_index_, -1); | 1856 DCHECK_NE(transform_tree_index_, -1); |
| 1848 return draw_property_utils::ScreenSpaceTransform( | 1857 return draw_property_utils::ScreenSpaceTransform( |
| 1849 this, layer_tree_host_->property_trees()->transform_tree); | 1858 this, layer_tree_host_->property_trees()->transform_tree); |
| 1850 } | 1859 } |
| 1851 | 1860 |
| 1852 } // namespace cc | 1861 } // namespace cc |
| OLD | NEW |