| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // These should be called by LayerImpl's ctor/dtor. | 130 // These should be called by LayerImpl's ctor/dtor. |
| 131 void RegisterLayer(LayerImpl* layer); | 131 void RegisterLayer(LayerImpl* layer); |
| 132 void UnregisterLayer(LayerImpl* layer); | 132 void UnregisterLayer(LayerImpl* layer); |
| 133 | 133 |
| 134 AnimationRegistrar* animationRegistrar() const; | 134 AnimationRegistrar* animationRegistrar() const; |
| 135 | 135 |
| 136 void PushPersistedState(LayerTreeImpl* pendingTree); | 136 void PushPersistedState(LayerTreeImpl* pendingTree); |
| 137 | 137 |
| 138 void DidBecomeActive(); | 138 void DidBecomeActive(); |
| 139 | 139 |
| 140 bool ContentsTexturesPurged() const; |
| 141 void SetContentsTexturesPurged(); |
| 142 void ResetContentsTexturesPurged(); |
| 143 |
| 140 protected: | 144 protected: |
| 141 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 145 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 142 | 146 |
| 143 LayerTreeHostImpl* layer_tree_host_impl_; | 147 LayerTreeHostImpl* layer_tree_host_impl_; |
| 144 int source_frame_number_; | 148 int source_frame_number_; |
| 145 scoped_ptr<LayerImpl> root_layer_; | 149 scoped_ptr<LayerImpl> root_layer_; |
| 146 HeadsUpDisplayLayerImpl* hud_layer_; | 150 HeadsUpDisplayLayerImpl* hud_layer_; |
| 147 LayerImpl* root_scroll_layer_; | 151 LayerImpl* root_scroll_layer_; |
| 148 LayerImpl* currently_scrolling_layer_; | 152 LayerImpl* currently_scrolling_layer_; |
| 149 SkColor background_color_; | 153 SkColor background_color_; |
| 150 bool has_transparent_background_; | 154 bool has_transparent_background_; |
| 151 | 155 |
| 152 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 156 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
| 153 LayerIdMap layer_id_map_; | 157 LayerIdMap layer_id_map_; |
| 154 | 158 |
| 155 // Persisted state for non-impl-side-painting. | 159 // Persisted state for non-impl-side-painting. |
| 156 int scrolling_layer_id_from_previous_tree_; | 160 int scrolling_layer_id_from_previous_tree_; |
| 157 | 161 |
| 158 // List of visible layers for the most recently prepared frame. Used for | 162 // List of visible layers for the most recently prepared frame. Used for |
| 159 // rendering and input event hit testing. | 163 // rendering and input event hit testing. |
| 160 LayerList render_surface_layer_list_; | 164 LayerList render_surface_layer_list_; |
| 161 | 165 |
| 166 bool contents_textures_purged_; |
| 167 |
| 162 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 168 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 163 }; | 169 }; |
| 164 | 170 |
| 165 } | 171 } |
| 166 | 172 |
| 167 #endif // CC_LAYER_TREE_IMPL_H_ | 173 #endif // CC_LAYER_TREE_IMPL_H_ |
| OLD | NEW |