| 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 26 matching lines...) Expand all Loading... |
| 37 class LayerTreeSettings; | 37 class LayerTreeSettings; |
| 38 class MemoryHistory; | 38 class MemoryHistory; |
| 39 class OutputSurface; | 39 class OutputSurface; |
| 40 class PageScaleAnimation; | 40 class PageScaleAnimation; |
| 41 class PaintTimeCounter; | 41 class PaintTimeCounter; |
| 42 class PictureLayerImpl; | 42 class PictureLayerImpl; |
| 43 class Proxy; | 43 class Proxy; |
| 44 class ResourceProvider; | 44 class ResourceProvider; |
| 45 class TileManager; | 45 class TileManager; |
| 46 class UIResourceRequest; | 46 class UIResourceRequest; |
| 47 struct PendingPageScaleAnimation; |
| 47 struct RendererCapabilities; | 48 struct RendererCapabilities; |
| 48 struct SelectionHandle; | 49 struct SelectionHandle; |
| 49 | 50 |
| 50 typedef std::list<UIResourceRequest> UIResourceRequestQueue; | 51 typedef std::list<UIResourceRequest> UIResourceRequestQueue; |
| 51 | 52 |
| 52 class CC_EXPORT LayerTreeImpl { | 53 class CC_EXPORT LayerTreeImpl { |
| 53 public: | 54 public: |
| 54 static scoped_ptr<LayerTreeImpl> create( | 55 static scoped_ptr<LayerTreeImpl> create( |
| 55 LayerTreeHostImpl* layer_tree_host_impl) { | 56 LayerTreeHostImpl* layer_tree_host_impl) { |
| 56 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); | 57 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 float top_controls_delta() const { | 304 float top_controls_delta() const { |
| 304 return top_controls_delta_; | 305 return top_controls_delta_; |
| 305 } | 306 } |
| 306 float sent_top_controls_delta() const { | 307 float sent_top_controls_delta() const { |
| 307 return sent_top_controls_delta_; | 308 return sent_top_controls_delta_; |
| 308 } | 309 } |
| 309 float total_top_controls_content_offset() const { | 310 float total_top_controls_content_offset() const { |
| 310 return top_controls_content_offset_ + top_controls_delta_; | 311 return top_controls_content_offset_ + top_controls_delta_; |
| 311 } | 312 } |
| 312 | 313 |
| 313 void SetPageScaleAnimation( | 314 void SetPendingPageScaleAnimation( |
| 314 const gfx::Vector2d& target_offset, | 315 scoped_ptr<PendingPageScaleAnimation> pending_animation); |
| 315 bool anchor_point, | 316 scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation(); |
| 316 float page_scale, | |
| 317 base::TimeDelta duration); | |
| 318 scoped_ptr<PageScaleAnimation> TakePageScaleAnimation(); | |
| 319 | 317 |
| 320 protected: | 318 protected: |
| 321 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 319 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 322 void ReleaseResourcesRecursive(LayerImpl* current); | 320 void ReleaseResourcesRecursive(LayerImpl* current); |
| 323 | 321 |
| 324 LayerTreeHostImpl* layer_tree_host_impl_; | 322 LayerTreeHostImpl* layer_tree_host_impl_; |
| 325 int source_frame_number_; | 323 int source_frame_number_; |
| 326 scoped_ptr<LayerImpl> root_layer_; | 324 scoped_ptr<LayerImpl> root_layer_; |
| 327 HeadsUpDisplayLayerImpl* hud_layer_; | 325 HeadsUpDisplayLayerImpl* hud_layer_; |
| 328 LayerImpl* currently_scrolling_layer_; | 326 LayerImpl* currently_scrolling_layer_; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // viewport resize) in Blink. i.e. How much the viewport was shrunk by the top | 378 // viewport resize) in Blink. i.e. How much the viewport was shrunk by the top |
| 381 // controls. | 379 // controls. |
| 382 float top_controls_layout_height_; | 380 float top_controls_layout_height_; |
| 383 | 381 |
| 384 // The up-to-date content offset of the top controls, i.e. the amount that the | 382 // The up-to-date content offset of the top controls, i.e. the amount that the |
| 385 // web contents have been shifted down from the top of the device viewport. | 383 // web contents have been shifted down from the top of the device viewport. |
| 386 float top_controls_content_offset_; | 384 float top_controls_content_offset_; |
| 387 float top_controls_delta_; | 385 float top_controls_delta_; |
| 388 float sent_top_controls_delta_; | 386 float sent_top_controls_delta_; |
| 389 | 387 |
| 390 scoped_ptr<PageScaleAnimation> page_scale_animation_; | 388 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 391 | 389 |
| 392 private: | 390 private: |
| 393 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 391 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 394 }; | 392 }; |
| 395 | 393 |
| 396 } // namespace cc | 394 } // namespace cc |
| 397 | 395 |
| 398 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 396 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |