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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // Methods called by the layer tree that pass-through or access LTHI. | 48 // Methods called by the layer tree that pass-through or access LTHI. |
49 // --------------------------------------------------------------------------- | 49 // --------------------------------------------------------------------------- |
50 const LayerTreeSettings& settings() const; | 50 const LayerTreeSettings& settings() const; |
51 OutputSurface* output_surface() const; | 51 OutputSurface* output_surface() const; |
52 ResourceProvider* resource_provider() const; | 52 ResourceProvider* resource_provider() const; |
53 TileManager* tile_manager() const; | 53 TileManager* tile_manager() const; |
54 FrameRateCounter* frame_rate_counter() const; | 54 FrameRateCounter* frame_rate_counter() const; |
55 PaintTimeCounter* paint_time_counter() const; | 55 PaintTimeCounter* paint_time_counter() const; |
56 bool IsActiveTree() const; | 56 bool IsActiveTree() const; |
57 bool IsPendingTree() const; | 57 bool IsPendingTree() const; |
| 58 bool IsRecycleTree() const; |
58 LayerImpl* FindActiveTreeLayerById(int id); | 59 LayerImpl* FindActiveTreeLayerById(int id); |
59 LayerImpl* FindPendingTreeLayerById(int id); | 60 LayerImpl* FindPendingTreeLayerById(int id); |
60 int MaxTextureSize() const; | 61 int MaxTextureSize() const; |
61 bool PinchGestureActive() const; | 62 bool PinchGestureActive() const; |
62 | 63 |
63 // Tree specific methods exposed to layer-impl tree. | 64 // Tree specific methods exposed to layer-impl tree. |
64 // --------------------------------------------------------------------------- | 65 // --------------------------------------------------------------------------- |
65 void SetNeedsRedraw(); | 66 void SetNeedsRedraw(); |
66 void SetNeedsUpdateDrawProperties(); | 67 void SetNeedsUpdateDrawProperties(); |
67 | 68 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 AnimationRegistrar* animationRegistrar() const; | 133 AnimationRegistrar* animationRegistrar() const; |
133 | 134 |
134 void PushPersistedState(LayerTreeImpl* pendingTree); | 135 void PushPersistedState(LayerTreeImpl* pendingTree); |
135 | 136 |
136 void DidBecomeActive(); | 137 void DidBecomeActive(); |
137 | 138 |
138 bool ContentsTexturesPurged() const; | 139 bool ContentsTexturesPurged() const; |
139 void SetContentsTexturesPurged(); | 140 void SetContentsTexturesPurged(); |
140 void ResetContentsTexturesPurged(); | 141 void ResetContentsTexturesPurged(); |
141 | 142 |
| 143 // Useful for debug assertions, probably shouldn't be used for anything else. |
| 144 Proxy* proxy() const; |
| 145 |
142 protected: | 146 protected: |
143 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 147 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
144 | 148 |
145 LayerTreeHostImpl* layer_tree_host_impl_; | 149 LayerTreeHostImpl* layer_tree_host_impl_; |
146 int source_frame_number_; | 150 int source_frame_number_; |
147 scoped_ptr<LayerImpl> root_layer_; | 151 scoped_ptr<LayerImpl> root_layer_; |
148 HeadsUpDisplayLayerImpl* hud_layer_; | 152 HeadsUpDisplayLayerImpl* hud_layer_; |
149 LayerImpl* root_scroll_layer_; | 153 LayerImpl* root_scroll_layer_; |
150 LayerImpl* currently_scrolling_layer_; | 154 LayerImpl* currently_scrolling_layer_; |
151 SkColor background_color_; | 155 SkColor background_color_; |
(...skipping 10 matching lines...) Expand all Loading... |
162 LayerList render_surface_layer_list_; | 166 LayerList render_surface_layer_list_; |
163 | 167 |
164 bool contents_textures_purged_; | 168 bool contents_textures_purged_; |
165 | 169 |
166 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 170 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
167 }; | 171 }; |
168 | 172 |
169 } | 173 } |
170 | 174 |
171 #endif // CC_LAYER_TREE_IMPL_H_ | 175 #endif // CC_LAYER_TREE_IMPL_H_ |
OLD | NEW |