| 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_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // These should be called by LayerImpl's ctor/dtor. | 172 // These should be called by LayerImpl's ctor/dtor. |
| 173 void RegisterLayer(LayerImpl* layer); | 173 void RegisterLayer(LayerImpl* layer); |
| 174 void UnregisterLayer(LayerImpl* layer); | 174 void UnregisterLayer(LayerImpl* layer); |
| 175 | 175 |
| 176 AnimationRegistrar* animationRegistrar() const; | 176 AnimationRegistrar* animationRegistrar() const; |
| 177 | 177 |
| 178 void PushPersistedState(LayerTreeImpl* pending_tree); | 178 void PushPersistedState(LayerTreeImpl* pending_tree); |
| 179 | 179 |
| 180 void DidBecomeActive(); | 180 void DidBecomeActive(); |
| 181 | 181 |
| 182 void SetUIResourceEvictionCountAcked(uint64 ui_resource_eviction_count_acked); |
| 183 uint64 ui_resource_eviction_count_acked() const { |
| 184 return ui_resource_eviction_count_acked_; |
| 185 } |
| 186 |
| 182 bool ContentsTexturesPurged() const; | 187 bool ContentsTexturesPurged() const; |
| 183 void SetContentsTexturesPurged(); | 188 void SetContentsTexturesPurged(); |
| 184 void ResetContentsTexturesPurged(); | 189 void ResetContentsTexturesPurged(); |
| 185 | 190 |
| 186 // Set on the active tree when the viewport size recently changed | 191 // Set on the active tree when the viewport size recently changed |
| 187 // and the active tree's size is now out of date. | 192 // and the active tree's size is now out of date. |
| 188 bool ViewportSizeInvalid() const; | 193 bool ViewportSizeInvalid() const; |
| 189 void SetViewportSizeInvalid(); | 194 void SetViewportSizeInvalid(); |
| 190 void ResetViewportSizeInvalid(); | 195 void ResetViewportSizeInvalid(); |
| 191 | 196 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 241 |
| 237 std::vector<LayerImpl*> layers_with_copy_output_request_; | 242 std::vector<LayerImpl*> layers_with_copy_output_request_; |
| 238 | 243 |
| 239 // Persisted state for non-impl-side-painting. | 244 // Persisted state for non-impl-side-painting. |
| 240 int scrolling_layer_id_from_previous_tree_; | 245 int scrolling_layer_id_from_previous_tree_; |
| 241 | 246 |
| 242 // List of visible layers for the most recently prepared frame. Used for | 247 // List of visible layers for the most recently prepared frame. Used for |
| 243 // rendering and input event hit testing. | 248 // rendering and input event hit testing. |
| 244 LayerImplList render_surface_layer_list_; | 249 LayerImplList render_surface_layer_list_; |
| 245 | 250 |
| 251 // The UI resource eviction count most recently acked. This value is updated |
| 252 // through ProcessUIResourceRequestQueue. If this value is not equal to |
| 253 // |layer_tree_host_impl_|'s UI resource eviction count, then this tree may |
| 254 // may reference evicted UI resources and cannot be drawn. |
| 255 uint64 ui_resource_eviction_count_acked_; |
| 256 |
| 246 bool contents_textures_purged_; | 257 bool contents_textures_purged_; |
| 247 bool viewport_size_invalid_; | 258 bool viewport_size_invalid_; |
| 248 bool needs_update_draw_properties_; | 259 bool needs_update_draw_properties_; |
| 249 | 260 |
| 250 // In impl-side painting mode, this is true when the tree may contain | 261 // In impl-side painting mode, this is true when the tree may contain |
| 251 // structural differences relative to the active tree. | 262 // structural differences relative to the active tree. |
| 252 bool needs_full_tree_sync_; | 263 bool needs_full_tree_sync_; |
| 253 | 264 |
| 254 ui::LatencyInfo latency_info_; | 265 ui::LatencyInfo latency_info_; |
| 255 | 266 |
| 256 UIResourceRequestQueue ui_resource_request_queue_; | 267 UIResourceRequestQueue ui_resource_request_queue_; |
| 257 | 268 |
| 258 private: | 269 private: |
| 259 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 270 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 260 }; | 271 }; |
| 261 | 272 |
| 262 } // namespace cc | 273 } // namespace cc |
| 263 | 274 |
| 264 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 275 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |