| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } | 269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
| 270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } | 270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
| 271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } | 271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
| 272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } | 272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
| 273 virtual void CreatePendingTree(); | 273 virtual void CreatePendingTree(); |
| 274 virtual void UpdateVisibleTiles(); | 274 virtual void UpdateVisibleTiles(); |
| 275 virtual void ActivatePendingTree(); | 275 virtual void ActivatePendingTree(); |
| 276 | 276 |
| 277 // Shortcuts to layers on the active tree. | 277 // Shortcuts to layers on the active tree. |
| 278 LayerImpl* RootLayer() const; | 278 LayerImpl* RootLayer() const; |
| 279 LayerImpl* RootScrollLayer() const; | 279 LayerImpl* InnerViewportScrollLayer() const; |
| 280 LayerImpl* OuterViewportScrollLayer() const; |
| 280 LayerImpl* CurrentlyScrollingLayer() const; | 281 LayerImpl* CurrentlyScrollingLayer() const; |
| 281 | 282 |
| 282 int scroll_layer_id_when_mouse_over_scrollbar() { | 283 int scroll_layer_id_when_mouse_over_scrollbar() { |
| 283 return scroll_layer_id_when_mouse_over_scrollbar_; | 284 return scroll_layer_id_when_mouse_over_scrollbar_; |
| 284 } | 285 } |
| 285 | 286 |
| 286 bool IsCurrentlyScrolling() const; | 287 bool IsCurrentlyScrolling() const; |
| 287 | 288 |
| 288 virtual void SetVisible(bool visible); | 289 virtual void SetVisible(bool visible); |
| 289 bool visible() const { return visible_; } | 290 bool visible() const { return visible_; } |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 void CreateAndSetRenderer( | 457 void CreateAndSetRenderer( |
| 457 OutputSurface* output_surface, | 458 OutputSurface* output_surface, |
| 458 ResourceProvider* resource_provider, | 459 ResourceProvider* resource_provider, |
| 459 bool skip_gl_renderer); | 460 bool skip_gl_renderer); |
| 460 void CreateAndSetTileManager(ResourceProvider* resource_provider, | 461 void CreateAndSetTileManager(ResourceProvider* resource_provider, |
| 461 ContextProvider* context_provider, | 462 ContextProvider* context_provider, |
| 462 bool using_map_image); | 463 bool using_map_image); |
| 463 void ReleaseTreeResources(); | 464 void ReleaseTreeResources(); |
| 464 void EnforceZeroBudget(bool zero_budget); | 465 void EnforceZeroBudget(bool zero_budget); |
| 465 | 466 |
| 467 void ScrollViewportBy(gfx::Vector2dF scroll_delta); |
| 466 void AnimatePageScale(base::TimeTicks monotonic_time); | 468 void AnimatePageScale(base::TimeTicks monotonic_time); |
| 467 void AnimateScrollbars(base::TimeTicks monotonic_time); | 469 void AnimateScrollbars(base::TimeTicks monotonic_time); |
| 468 void AnimateTopControls(base::TimeTicks monotonic_time); | 470 void AnimateTopControls(base::TimeTicks monotonic_time); |
| 469 | 471 |
| 470 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 472 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
| 471 LayerImpl* layer_impl, | 473 LayerImpl* layer_impl, |
| 472 float scale_from_viewport_to_screen_space, | 474 float scale_from_viewport_to_screen_space, |
| 473 const gfx::PointF& viewport_point, | 475 const gfx::PointF& viewport_point, |
| 474 gfx::Vector2dF viewport_delta); | 476 gfx::Vector2dF viewport_delta); |
| 475 | 477 |
| 476 void UpdateMaxScrollOffset(); | |
| 477 void TrackDamageForAllSurfaces( | 478 void TrackDamageForAllSurfaces( |
| 478 LayerImpl* root_draw_layer, | 479 LayerImpl* root_draw_layer, |
| 479 const LayerImplList& render_surface_layer_list); | 480 const LayerImplList& render_surface_layer_list); |
| 480 | 481 |
| 481 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); | 482 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); |
| 482 | 483 |
| 483 // Returns false if the frame should not be displayed. This function should | 484 // Returns false if the frame should not be displayed. This function should |
| 484 // only be called from PrepareToDraw, as DidDrawAllLayers must be called | 485 // only be called from PrepareToDraw, as DidDrawAllLayers must be called |
| 485 // if this helper function is called. | 486 // if this helper function is called. |
| 486 bool CalculateRenderPasses(FrameData* frame); | 487 bool CalculateRenderPasses(FrameData* frame); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 int id_; | 652 int id_; |
| 652 | 653 |
| 653 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 654 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 654 | 655 |
| 655 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 656 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 656 }; | 657 }; |
| 657 | 658 |
| 658 } // namespace cc | 659 } // namespace cc |
| 659 | 660 |
| 660 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 661 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |