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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 | 130 |
131 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 131 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
132 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { | 132 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { |
133 hud_layer_ = layer_impl; | 133 hud_layer_ = layer_impl; |
134 } | 134 } |
135 | 135 |
136 LayerImpl* InnerViewportScrollLayer() const; | 136 LayerImpl* InnerViewportScrollLayer() const; |
137 // This function may return NULL, it is the caller's responsibility to check. | 137 // This function may return NULL, it is the caller's responsibility to check. |
138 LayerImpl* OuterViewportScrollLayer() const; | 138 LayerImpl* OuterViewportScrollLayer() const; |
139 gfx::Vector2dF TotalScrollOffset() const; | 139 gfx::ScrollOffset TotalScrollOffset() const; |
140 gfx::Vector2dF TotalMaxScrollOffset() const; | 140 gfx::ScrollOffset TotalMaxScrollOffset() const; |
141 gfx::Vector2dF TotalScrollDelta() const; | 141 gfx::Vector2dF TotalScrollDelta() const; |
142 | 142 |
143 LayerImpl* InnerViewportContainerLayer() const; | 143 LayerImpl* InnerViewportContainerLayer() const; |
144 LayerImpl* CurrentlyScrollingLayer() const; | 144 LayerImpl* CurrentlyScrollingLayer() const; |
145 void SetCurrentlyScrollingLayer(LayerImpl* layer); | 145 void SetCurrentlyScrollingLayer(LayerImpl* layer); |
146 void ClearCurrentlyScrollingLayer(); | 146 void ClearCurrentlyScrollingLayer(); |
147 | 147 |
148 void SetViewportLayersFromIds(int page_scale_layer_id, | 148 void SetViewportLayersFromIds(int page_scale_layer_id, |
149 int inner_viewport_scroll_layer_id, | 149 int inner_viewport_scroll_layer_id, |
150 int outer_viewport_scroll_layer_id); | 150 int outer_viewport_scroll_layer_id); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 bool ViewportSizeInvalid() const; | 240 bool ViewportSizeInvalid() const; |
241 void SetViewportSizeInvalid(); | 241 void SetViewportSizeInvalid(); |
242 void ResetViewportSizeInvalid(); | 242 void ResetViewportSizeInvalid(); |
243 | 243 |
244 // Useful for debug assertions, probably shouldn't be used for anything else. | 244 // Useful for debug assertions, probably shouldn't be used for anything else. |
245 Proxy* proxy() const; | 245 Proxy* proxy() const; |
246 | 246 |
247 void SetRootLayerScrollOffsetDelegate( | 247 void SetRootLayerScrollOffsetDelegate( |
248 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); | 248 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); |
249 void UpdateScrollOffsetDelegate(); | 249 void UpdateScrollOffsetDelegate(); |
250 gfx::Vector2dF GetDelegatedScrollOffset(LayerImpl* layer); | 250 gfx::ScrollOffset GetDelegatedScrollOffset(LayerImpl* layer); |
251 | 251 |
252 // Call this function when you expect there to be a swap buffer. | 252 // Call this function when you expect there to be a swap buffer. |
253 // See swap_promise.h for how to use SwapPromise. | 253 // See swap_promise.h for how to use SwapPromise. |
254 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 254 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
255 | 255 |
256 // Take the |new_swap_promise| and append it to |swap_promise_list_|. | 256 // Take the |new_swap_promise| and append it to |swap_promise_list_|. |
257 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); | 257 void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise); |
258 void FinishSwapPromises(CompositorFrameMetadata* metadata); | 258 void FinishSwapPromises(CompositorFrameMetadata* metadata); |
259 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 259 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
260 | 260 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 float top_controls_delta_; | 392 float top_controls_delta_; |
393 float sent_top_controls_delta_; | 393 float sent_top_controls_delta_; |
394 | 394 |
395 private: | 395 private: |
396 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 396 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
397 }; | 397 }; |
398 | 398 |
399 } // namespace cc | 399 } // namespace cc |
400 | 400 |
401 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 401 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |