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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
68 virtual void NotifyReadyToActivate() = 0; | 68 virtual void NotifyReadyToActivate() = 0; |
69 // Please call these 2 functions through | 69 // Please call these 2 functions through |
70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). | 70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). |
71 virtual void SetNeedsRedrawOnImplThread() = 0; | 71 virtual void SetNeedsRedrawOnImplThread() = 0; |
72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; | 72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; |
73 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 73 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
74 virtual void SetNeedsCommitOnImplThread() = 0; | 74 virtual void SetNeedsCommitOnImplThread() = 0; |
75 virtual void SetNeedsManageTilesOnImplThread() = 0; | 75 virtual void SetNeedsManageTilesOnImplThread() = 0; |
76 virtual void PostAnimationEventsToMainThreadOnImplThread( | 76 virtual void PostAnimationEventsToMainThreadOnImplThread( |
77 scoped_ptr<AnimationEventsVector> events, | 77 scoped_ptr<AnimationEventsVector> events) = 0; |
78 base::Time wall_clock_time) = 0; | |
79 // Returns true if resources were deleted by this call. | 78 // Returns true if resources were deleted by this call. |
80 virtual bool ReduceContentsTextureMemoryOnImplThread( | 79 virtual bool ReduceContentsTextureMemoryOnImplThread( |
81 size_t limit_bytes, | 80 size_t limit_bytes, |
82 int priority_cutoff) = 0; | 81 int priority_cutoff) = 0; |
83 virtual void SendManagedMemoryStats() = 0; | 82 virtual void SendManagedMemoryStats() = 0; |
84 virtual bool IsInsideDraw() = 0; | 83 virtual bool IsInsideDraw() = 0; |
85 virtual void RenewTreePriority() = 0; | 84 virtual void RenewTreePriority() = 0; |
86 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; | 85 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; |
87 virtual void DidActivatePendingTree() = 0; | 86 virtual void DidActivatePendingTree() = 0; |
88 virtual void DidManageTiles() = 0; | 87 virtual void DidManageTiles() = 0; |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 bool visible_; | 574 bool visible_; |
576 ManagedMemoryPolicy cached_managed_memory_policy_; | 575 ManagedMemoryPolicy cached_managed_memory_policy_; |
577 | 576 |
578 gfx::Vector2dF accumulated_root_overscroll_; | 577 gfx::Vector2dF accumulated_root_overscroll_; |
579 gfx::Vector2dF current_fling_velocity_; | 578 gfx::Vector2dF current_fling_velocity_; |
580 | 579 |
581 bool pinch_gesture_active_; | 580 bool pinch_gesture_active_; |
582 bool pinch_gesture_end_should_clear_scrolling_layer_; | 581 bool pinch_gesture_end_should_clear_scrolling_layer_; |
583 gfx::Point previous_pinch_anchor_; | 582 gfx::Point previous_pinch_anchor_; |
584 | 583 |
585 // This is set by AnimateLayers() and used by UpdateAnimationState() | |
586 // when sending animation events to the main thread. | |
587 base::Time last_animation_time_; | |
588 | |
589 scoped_ptr<TopControlsManager> top_controls_manager_; | 584 scoped_ptr<TopControlsManager> top_controls_manager_; |
590 | 585 |
591 scoped_ptr<PageScaleAnimation> page_scale_animation_; | 586 scoped_ptr<PageScaleAnimation> page_scale_animation_; |
592 | 587 |
593 // This is used for ticking animations slowly when hidden. | 588 // This is used for ticking animations slowly when hidden. |
594 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_; | 589 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_; |
595 | 590 |
596 scoped_ptr<FrameRateCounter> fps_counter_; | 591 scoped_ptr<FrameRateCounter> fps_counter_; |
597 scoped_ptr<PaintTimeCounter> paint_time_counter_; | 592 scoped_ptr<PaintTimeCounter> paint_time_counter_; |
598 scoped_ptr<MemoryHistory> memory_history_; | 593 scoped_ptr<MemoryHistory> memory_history_; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 int id_; | 660 int id_; |
666 | 661 |
667 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 662 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
668 | 663 |
669 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 664 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
670 }; | 665 }; |
671 | 666 |
672 } // namespace cc | 667 } // namespace cc |
673 | 668 |
674 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 669 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |