| 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 "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class Proxy; | 35 class Proxy; |
| 36 class ResourceProvider; | 36 class ResourceProvider; |
| 37 class ScrollbarLayerImpl; | 37 class ScrollbarLayerImpl; |
| 38 class TileManager; | 38 class TileManager; |
| 39 struct RendererCapabilities; | 39 struct RendererCapabilities; |
| 40 | 40 |
| 41 class CC_EXPORT LayerTreeImpl { | 41 class CC_EXPORT LayerTreeImpl { |
| 42 public: | 42 public: |
| 43 typedef std::vector<LayerImpl*> LayerList; | 43 typedef std::vector<LayerImpl*> LayerList; |
| 44 | 44 |
| 45 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp
l) | 45 static scoped_ptr<LayerTreeImpl> create( |
| 46 { | 46 LayerTreeHostImpl* layer_tree_host_impl) { |
| 47 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); | 47 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); |
| 48 } | 48 } |
| 49 virtual ~LayerTreeImpl(); | 49 virtual ~LayerTreeImpl(); |
| 50 | 50 |
| 51 // Methods called by the layer tree that pass-through or access LTHI. | 51 // Methods called by the layer tree that pass-through or access LTHI. |
| 52 // --------------------------------------------------------------------------- | 52 // --------------------------------------------------------------------------- |
| 53 const LayerTreeSettings& settings() const; | 53 const LayerTreeSettings& settings() const; |
| 54 const RendererCapabilities& rendererCapabilities() const; | 54 const RendererCapabilities& GetRendererCapabilities() const; |
| 55 OutputSurface* output_surface() const; | 55 OutputSurface* output_surface() const; |
| 56 ResourceProvider* resource_provider() const; | 56 ResourceProvider* resource_provider() const; |
| 57 TileManager* tile_manager() const; | 57 TileManager* tile_manager() const; |
| 58 FrameRateCounter* frame_rate_counter() const; | 58 FrameRateCounter* frame_rate_counter() const; |
| 59 PaintTimeCounter* paint_time_counter() const; | 59 PaintTimeCounter* paint_time_counter() const; |
| 60 MemoryHistory* memory_history() const; | 60 MemoryHistory* memory_history() const; |
| 61 bool IsActiveTree() const; | 61 bool IsActiveTree() const; |
| 62 bool IsPendingTree() const; | 62 bool IsPendingTree() const; |
| 63 bool IsRecycleTree() const; | 63 bool IsRecycleTree() const; |
| 64 LayerImpl* FindActiveTreeLayerById(int id); | 64 LayerImpl* FindActiveTreeLayerById(int id); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 gfx::SizeF ScrollableViewportSize() const; | 165 gfx::SizeF ScrollableViewportSize() const; |
| 166 | 166 |
| 167 LayerImpl* LayerById(int id); | 167 LayerImpl* LayerById(int id); |
| 168 | 168 |
| 169 // These should be called by LayerImpl's ctor/dtor. | 169 // These should be called by LayerImpl's ctor/dtor. |
| 170 void RegisterLayer(LayerImpl* layer); | 170 void RegisterLayer(LayerImpl* layer); |
| 171 void UnregisterLayer(LayerImpl* layer); | 171 void UnregisterLayer(LayerImpl* layer); |
| 172 | 172 |
| 173 AnimationRegistrar* animationRegistrar() const; | 173 AnimationRegistrar* animationRegistrar() const; |
| 174 | 174 |
| 175 void PushPersistedState(LayerTreeImpl* pendingTree); | 175 void PushPersistedState(LayerTreeImpl* pending_tree); |
| 176 | 176 |
| 177 void DidBecomeActive(); | 177 void DidBecomeActive(); |
| 178 | 178 |
| 179 bool ContentsTexturesPurged() const; | 179 bool ContentsTexturesPurged() const; |
| 180 void SetContentsTexturesPurged(); | 180 void SetContentsTexturesPurged(); |
| 181 void ResetContentsTexturesPurged(); | 181 void ResetContentsTexturesPurged(); |
| 182 | 182 |
| 183 // Set on the active tree when the viewport size recently changed | 183 // Set on the active tree when the viewport size recently changed |
| 184 // and the active tree's size is now out of date. | 184 // and the active tree's size is now out of date. |
| 185 bool ViewportSizeInvalid() const; | 185 bool ViewportSizeInvalid() const; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // In impl-side painting mode, this is true when the tree may contain | 244 // In impl-side painting mode, this is true when the tree may contain |
| 245 // structural differences relative to the active tree. | 245 // structural differences relative to the active tree. |
| 246 bool needs_full_tree_sync_; | 246 bool needs_full_tree_sync_; |
| 247 | 247 |
| 248 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 248 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 } | 251 } |
| 252 | 252 |
| 253 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 253 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |