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