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 10 matching lines...) Expand all Loading... |
21 namespace BASE_HASH_NAMESPACE { | 21 namespace BASE_HASH_NAMESPACE { |
22 template<> | 22 template<> |
23 struct hash<cc::LayerImpl*> { | 23 struct hash<cc::LayerImpl*> { |
24 size_t operator()(cc::LayerImpl* ptr) const { | 24 size_t operator()(cc::LayerImpl* ptr) const { |
25 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 25 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
26 } | 26 } |
27 }; | 27 }; |
28 } // namespace BASE_HASH_NAMESPACE | 28 } // namespace BASE_HASH_NAMESPACE |
29 #endif // COMPILER | 29 #endif // COMPILER |
30 | 30 |
| 31 namespace base { |
| 32 namespace debug { |
| 33 class TracedValue; |
| 34 } |
| 35 } |
| 36 |
31 namespace cc { | 37 namespace cc { |
32 | 38 |
33 class ContextProvider; | 39 class ContextProvider; |
34 class DebugRectHistory; | 40 class DebugRectHistory; |
35 class FrameRateCounter; | 41 class FrameRateCounter; |
36 class HeadsUpDisplayLayerImpl; | 42 class HeadsUpDisplayLayerImpl; |
37 class LayerScrollOffsetDelegateProxy; | 43 class LayerScrollOffsetDelegateProxy; |
38 class LayerTreeDebugState; | 44 class LayerTreeDebugState; |
39 class LayerTreeHostImpl; | 45 class LayerTreeHostImpl; |
40 class LayerTreeImpl; | 46 class LayerTreeImpl; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 105 |
100 // Tree specific methods exposed to layer-impl tree. | 106 // Tree specific methods exposed to layer-impl tree. |
101 // --------------------------------------------------------------------------- | 107 // --------------------------------------------------------------------------- |
102 void SetNeedsRedraw(); | 108 void SetNeedsRedraw(); |
103 | 109 |
104 // TODO(nduca): These are implemented in cc files temporarily, but will become | 110 // TODO(nduca): These are implemented in cc files temporarily, but will become |
105 // trivial accessors in a followup patch. | 111 // trivial accessors in a followup patch. |
106 const LayerTreeDebugState& debug_state() const; | 112 const LayerTreeDebugState& debug_state() const; |
107 float device_scale_factor() const; | 113 float device_scale_factor() const; |
108 DebugRectHistory* debug_rect_history() const; | 114 DebugRectHistory* debug_rect_history() const; |
109 scoped_ptr<base::Value> AsValue() const; | 115 void AsValueInto(base::debug::TracedValue* dict) const; |
110 | 116 |
111 // Other public methods | 117 // Other public methods |
112 // --------------------------------------------------------------------------- | 118 // --------------------------------------------------------------------------- |
113 LayerImpl* root_layer() const { return root_layer_.get(); } | 119 LayerImpl* root_layer() const { return root_layer_.get(); } |
114 void SetRootLayer(scoped_ptr<LayerImpl>); | 120 void SetRootLayer(scoped_ptr<LayerImpl>); |
115 scoped_ptr<LayerImpl> DetachLayerTree(); | 121 scoped_ptr<LayerImpl> DetachLayerTree(); |
116 | 122 |
117 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 123 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
118 | 124 |
119 int source_frame_number() const { return source_frame_number_; } | 125 int source_frame_number() const { return source_frame_number_; } |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 352 |
347 int render_surface_layer_list_id_; | 353 int render_surface_layer_list_id_; |
348 | 354 |
349 private: | 355 private: |
350 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 356 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
351 }; | 357 }; |
352 | 358 |
353 } // namespace cc | 359 } // namespace cc |
354 | 360 |
355 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 361 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |