OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef CC_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_IMPL_H_ |
6 #define CC_LAYER_TREE_IMPL_H_ | 6 #define CC_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "cc/layer_impl.h" | 9 #include "cc/layer_impl.h" |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 LayerImpl* LayerById(int id); | 124 LayerImpl* LayerById(int id); |
125 | 125 |
126 // These should be called by LayerImpl's ctor/dtor. | 126 // These should be called by LayerImpl's ctor/dtor. |
127 void RegisterLayer(LayerImpl* layer); | 127 void RegisterLayer(LayerImpl* layer); |
128 void UnregisterLayer(LayerImpl* layer); | 128 void UnregisterLayer(LayerImpl* layer); |
129 | 129 |
130 AnimationRegistrar* animationRegistrar() const; | 130 AnimationRegistrar* animationRegistrar() const; |
131 | 131 |
132 protected: | 132 protected: |
133 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 133 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
134 | 134 |
135 LayerTreeHostImpl* layer_tree_host_impl_; | 135 LayerTreeHostImpl* layer_tree_host_impl_; |
136 int source_frame_number_; | 136 int source_frame_number_; |
137 scoped_ptr<LayerImpl> root_layer_; | 137 scoped_ptr<LayerImpl> root_layer_; |
138 HeadsUpDisplayLayerImpl* hud_layer_; | 138 HeadsUpDisplayLayerImpl* hud_layer_; |
139 LayerImpl* root_scroll_layer_; | 139 LayerImpl* root_scroll_layer_; |
140 LayerImpl* currently_scrolling_layer_; | 140 LayerImpl* currently_scrolling_layer_; |
141 SkColor background_color_; | 141 SkColor background_color_; |
142 bool has_transparent_background_; | 142 bool has_transparent_background_; |
143 | 143 |
144 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 144 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
145 LayerIdMap layer_id_map_; | 145 LayerIdMap layer_id_map_; |
146 | 146 |
147 // Persisted state | 147 // Persisted state |
148 int scrolling_layer_id_from_previous_tree_; | 148 int scrolling_layer_id_from_previous_tree_; |
149 | 149 |
150 // List of visible layers for the most recently prepared frame. Used for | 150 // List of visible layers for the most recently prepared frame. Used for |
151 // rendering and input event hit testing. | 151 // rendering and input event hit testing. |
152 LayerList render_surface_layer_list_; | 152 LayerList render_surface_layer_list_; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 154 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
155 }; | 155 }; |
156 | 156 |
157 } | 157 } |
158 | 158 |
159 #endif // CC_LAYER_TREE_IMPL_H_ | 159 #endif // CC_LAYER_TREE_IMPL_H_ |
OLD | NEW |