| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 103 |
| 98 // Tree specific methods exposed to layer-impl tree. | 104 // Tree specific methods exposed to layer-impl tree. |
| 99 // --------------------------------------------------------------------------- | 105 // --------------------------------------------------------------------------- |
| 100 void SetNeedsRedraw(); | 106 void SetNeedsRedraw(); |
| 101 | 107 |
| 102 // TODO(nduca): These are implemented in cc files temporarily, but will become | 108 // TODO(nduca): These are implemented in cc files temporarily, but will become |
| 103 // trivial accessors in a followup patch. | 109 // trivial accessors in a followup patch. |
| 104 const LayerTreeDebugState& debug_state() const; | 110 const LayerTreeDebugState& debug_state() const; |
| 105 float device_scale_factor() const; | 111 float device_scale_factor() const; |
| 106 DebugRectHistory* debug_rect_history() const; | 112 DebugRectHistory* debug_rect_history() const; |
| 107 scoped_ptr<base::Value> AsValue() const; | 113 void AsValueInto(base::debug::TracedValue* dict) const; |
| 108 | 114 |
| 109 // Other public methods | 115 // Other public methods |
| 110 // --------------------------------------------------------------------------- | 116 // --------------------------------------------------------------------------- |
| 111 LayerImpl* root_layer() const { return root_layer_.get(); } | 117 LayerImpl* root_layer() const { return root_layer_.get(); } |
| 112 void SetRootLayer(scoped_ptr<LayerImpl>); | 118 void SetRootLayer(scoped_ptr<LayerImpl>); |
| 113 scoped_ptr<LayerImpl> DetachLayerTree(); | 119 scoped_ptr<LayerImpl> DetachLayerTree(); |
| 114 | 120 |
| 115 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 121 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
| 116 | 122 |
| 117 int source_frame_number() const { return source_frame_number_; } | 123 int source_frame_number() const { return source_frame_number_; } |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 350 |
| 345 int render_surface_layer_list_id_; | 351 int render_surface_layer_list_id_; |
| 346 | 352 |
| 347 private: | 353 private: |
| 348 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 354 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 349 }; | 355 }; |
| 350 | 356 |
| 351 } // namespace cc | 357 } // namespace cc |
| 352 | 358 |
| 353 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 359 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |