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 "cc/layer_impl.h" | 8 #include "cc/layer_impl.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 class DebugRectHistory; | 12 class DebugRectHistory; |
13 class FrameRateCounter; | 13 class FrameRateCounter; |
14 class HeadsUpDisplayLayerImpl; | 14 class HeadsUpDisplayLayerImpl; |
15 class LayerTreeDebugState; | 15 class LayerTreeDebugState; |
16 class LayerTreeHostImpl; | 16 class LayerTreeHostImpl; |
17 class LayerTreeImpl; | 17 class LayerTreeImpl; |
18 class LayerTreeSettings; | 18 class LayerTreeSettings; |
19 class OutputSurface; | 19 class OutputSurface; |
| 20 class PinchZoomScrollbarsManager; |
20 class ResourceProvider; | 21 class ResourceProvider; |
21 class TileManager; | 22 class TileManager; |
22 | 23 |
23 class CC_EXPORT LayerTreeImpl { | 24 class CC_EXPORT LayerTreeImpl { |
24 public: | 25 public: |
25 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp
l) | 26 static scoped_ptr<LayerTreeImpl> create(LayerTreeHostImpl* layer_tree_host_imp
l) |
26 { | 27 { |
27 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); | 28 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); |
28 } | 29 } |
29 virtual ~LayerTreeImpl(); | 30 virtual ~LayerTreeImpl(); |
(...skipping 25 matching lines...) Expand all Loading... |
55 LayerImpl* RootLayer() const { return root_layer_.get(); } | 56 LayerImpl* RootLayer() const { return root_layer_.get(); } |
56 void SetRootLayer(scoped_ptr<LayerImpl>); | 57 void SetRootLayer(scoped_ptr<LayerImpl>); |
57 scoped_ptr<LayerImpl> DetachLayerTree(); | 58 scoped_ptr<LayerImpl> DetachLayerTree(); |
58 | 59 |
59 int source_frame_number() const { return source_frame_number_; } | 60 int source_frame_number() const { return source_frame_number_; } |
60 void set_source_frame_number(int frame_number) { source_frame_number_ = frame_
number; } | 61 void set_source_frame_number(int frame_number) { source_frame_number_ = frame_
number; } |
61 | 62 |
62 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 63 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
63 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { hud_layer_ = layer_i
mpl; } | 64 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { hud_layer_ = layer_i
mpl; } |
64 | 65 |
| 66 ScrollbarLayerImpl* pinch_zoom_scrollbar_vertical() { return pinch_zoom_scroll
bar_vertical_; } |
| 67 void set_pinch_zoom_scrollbar_vertical(ScrollbarLayerImpl* layer_impl); |
| 68 |
| 69 ScrollbarLayerImpl* pinch_zoom_scrollbar_horizontal() { return pinch_zoom_scro
llbar_horizontal_; } |
| 70 void set_pinch_zoom_scrollbar_horizontal(ScrollbarLayerImpl* layer_impl); |
| 71 |
| 72 PinchZoomScrollbarsManager* pinch_zoom_scrollbars_manager() { return pinch_zoo
m_scrollbars_.get(); } |
| 73 |
65 LayerImpl* root_scroll_layer() { return root_scroll_layer_; } | 74 LayerImpl* root_scroll_layer() { return root_scroll_layer_; } |
66 void set_root_scroll_layer(LayerImpl* layer_impl) { root_scroll_layer_ = layer
_impl; } | 75 void set_root_scroll_layer(LayerImpl* layer_impl) { root_scroll_layer_ = layer
_impl; } |
67 | 76 |
68 LayerImpl* currently_scrolling_layer() { return currently_scrolling_layer_; } | 77 LayerImpl* currently_scrolling_layer() { return currently_scrolling_layer_; } |
69 void set_currently_scrolling_layer(LayerImpl* layer_impl) { currently_scrollin
g_layer_ = layer_impl; } | 78 void set_currently_scrolling_layer(LayerImpl* layer_impl) { currently_scrollin
g_layer_ = layer_impl; } |
70 | 79 |
71 void ClearCurrentlyScrollingLayer(); | 80 void ClearCurrentlyScrollingLayer(); |
72 | 81 |
73 protected: | 82 protected: |
74 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 83 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
75 | 84 |
76 LayerTreeHostImpl* layer_tree_host_impl_; | 85 LayerTreeHostImpl* layer_tree_host_impl_; |
77 int source_frame_number_; | 86 int source_frame_number_; |
78 scoped_ptr<LayerImpl> root_layer_; | 87 scoped_ptr<LayerImpl> root_layer_; |
79 HeadsUpDisplayLayerImpl* hud_layer_; | 88 HeadsUpDisplayLayerImpl* hud_layer_; |
| 89 ScrollbarLayerImpl* pinch_zoom_scrollbar_vertical_; |
| 90 ScrollbarLayerImpl* pinch_zoom_scrollbar_horizontal_; |
80 LayerImpl* root_scroll_layer_; | 91 LayerImpl* root_scroll_layer_; |
81 LayerImpl* currently_scrolling_layer_; | 92 LayerImpl* currently_scrolling_layer_; |
82 | 93 |
| 94 scoped_ptr<PinchZoomScrollbarsManager> pinch_zoom_scrollbars_; |
| 95 |
83 // Persisted state | 96 // Persisted state |
84 int scrolling_layer_id_from_previous_tree_; | 97 int scrolling_layer_id_from_previous_tree_; |
85 | 98 |
86 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 99 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
87 }; | 100 }; |
88 | 101 |
89 } | 102 } |
90 | 103 |
91 #endif // CC_LAYER_TREE_IMPL_H_ | 104 #endif // CC_LAYER_TREE_IMPL_H_ |
OLD | NEW |