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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 gfx::SizeF ScrollableViewportSize() const; | 166 gfx::SizeF ScrollableViewportSize() const; |
167 | 167 |
168 LayerImpl* LayerById(int id); | 168 LayerImpl* LayerById(int id); |
169 | 169 |
170 // These should be called by LayerImpl's ctor/dtor. | 170 // These should be called by LayerImpl's ctor/dtor. |
171 void RegisterLayer(LayerImpl* layer); | 171 void RegisterLayer(LayerImpl* layer); |
172 void UnregisterLayer(LayerImpl* layer); | 172 void UnregisterLayer(LayerImpl* layer); |
173 | 173 |
174 AnimationRegistrar* animationRegistrar() const; | 174 AnimationRegistrar* animationRegistrar() const; |
175 | 175 |
176 void PushPersistedState(LayerTreeImpl* pendingTree); | 176 void PushPersistedState(LayerTreeImpl* pending_tree); |
177 | 177 |
178 void DidBecomeActive(); | 178 void DidBecomeActive(); |
179 | 179 |
180 bool ContentsTexturesPurged() const; | 180 bool ContentsTexturesPurged() const; |
181 void SetContentsTexturesPurged(); | 181 void SetContentsTexturesPurged(); |
182 void ResetContentsTexturesPurged(); | 182 void ResetContentsTexturesPurged(); |
183 | 183 |
184 // Set on the active tree when the viewport size recently changed | 184 // Set on the active tree when the viewport size recently changed |
185 // and the active tree's size is now out of date. | 185 // and the active tree's size is now out of date. |
186 bool ViewportSizeInvalid() const; | 186 bool ViewportSizeInvalid() const; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // In impl-side painting mode, this is true when the tree may contain | 245 // In impl-side painting mode, this is true when the tree may contain |
246 // structural differences relative to the active tree. | 246 // structural differences relative to the active tree. |
247 bool needs_full_tree_sync_; | 247 bool needs_full_tree_sync_; |
248 | 248 |
249 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 249 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
250 }; | 250 }; |
251 | 251 |
252 } | 252 } |
253 | 253 |
254 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 254 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |