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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "cc/base/scoped_ptr_vector.h" | 14 #include "cc/base/scoped_ptr_vector.h" |
15 #include "cc/base/swap_promise.h" | 15 #include "cc/base/swap_promise.h" |
16 #include "cc/base/synced_property.h" | 16 #include "cc/base/synced_property.h" |
17 #include "cc/layers/layer_impl.h" | 17 #include "cc/layers/layer_impl.h" |
18 #include "cc/output/renderer.h" | 18 #include "cc/output/renderer.h" |
19 #include "cc/resources/ui_resource_client.h" | 19 #include "cc/resources/ui_resource_client.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 namespace trace_event { | 22 namespace trace_event { |
23 class TracedValue; | 23 class TracedValue; |
24 } | 24 } |
25 | |
26 // TODO(ssid): remove these aliases after the tracing clients are moved to the | |
27 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 | |
28 namespace debug { | |
29 using ::base::trace_event::TracedValue; | |
30 } | 25 } |
31 } // namespace base | |
32 | 26 |
33 namespace cc { | 27 namespace cc { |
34 | 28 |
35 class ContextProvider; | 29 class ContextProvider; |
36 class DebugRectHistory; | 30 class DebugRectHistory; |
37 class FrameRateCounter; | 31 class FrameRateCounter; |
38 class HeadsUpDisplayLayerImpl; | 32 class HeadsUpDisplayLayerImpl; |
39 class LayerScrollOffsetDelegateProxy; | 33 class LayerScrollOffsetDelegateProxy; |
40 class LayerTreeDebugState; | 34 class LayerTreeDebugState; |
41 class LayerTreeHostImpl; | 35 class LayerTreeHostImpl; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Tree specific methods exposed to layer-impl tree. | 107 // Tree specific methods exposed to layer-impl tree. |
114 // --------------------------------------------------------------------------- | 108 // --------------------------------------------------------------------------- |
115 void SetNeedsRedraw(); | 109 void SetNeedsRedraw(); |
116 | 110 |
117 // TODO(nduca): These are implemented in cc files temporarily, but will become | 111 // TODO(nduca): These are implemented in cc files temporarily, but will become |
118 // trivial accessors in a followup patch. | 112 // trivial accessors in a followup patch. |
119 const LayerTreeDebugState& debug_state() const; | 113 const LayerTreeDebugState& debug_state() const; |
120 float device_scale_factor() const; | 114 float device_scale_factor() const; |
121 DebugRectHistory* debug_rect_history() const; | 115 DebugRectHistory* debug_rect_history() const; |
122 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; | 116 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; |
123 void AsValueInto(base::debug::TracedValue* dict) const; | 117 void AsValueInto(base::trace_event::TracedValue* dict) const; |
124 | 118 |
125 // Other public methods | 119 // Other public methods |
126 // --------------------------------------------------------------------------- | 120 // --------------------------------------------------------------------------- |
127 LayerImpl* root_layer() const { return root_layer_.get(); } | 121 LayerImpl* root_layer() const { return root_layer_.get(); } |
128 void SetRootLayer(scoped_ptr<LayerImpl>); | 122 void SetRootLayer(scoped_ptr<LayerImpl>); |
129 scoped_ptr<LayerImpl> DetachLayerTree(); | 123 scoped_ptr<LayerImpl> DetachLayerTree(); |
130 | 124 |
131 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 125 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
132 | 126 |
133 int source_frame_number() const { return source_frame_number_; } | 127 int source_frame_number() const { return source_frame_number_; } |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 | 408 |
415 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 409 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
416 | 410 |
417 private: | 411 private: |
418 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 412 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
419 }; | 413 }; |
420 | 414 |
421 } // namespace cc | 415 } // namespace cc |
422 | 416 |
423 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 417 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |