| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 gfx::Point viewport_point, | 108 gfx::Point viewport_point, |
| 109 InputHandler::ScrollInputType type) OVERRIDE; | 109 InputHandler::ScrollInputType type) OVERRIDE; |
| 110 virtual bool ScrollBy(gfx::Point viewport_point, | 110 virtual bool ScrollBy(gfx::Point viewport_point, |
| 111 gfx::Vector2dF scroll_delta) OVERRIDE; | 111 gfx::Vector2dF scroll_delta) OVERRIDE; |
| 112 virtual bool ScrollVerticallyByPage(gfx::Point viewport_point, | 112 virtual bool ScrollVerticallyByPage(gfx::Point viewport_point, |
| 113 ScrollDirection direction) OVERRIDE; | 113 ScrollDirection direction) OVERRIDE; |
| 114 virtual void SetRootLayerScrollOffsetDelegate( | 114 virtual void SetRootLayerScrollOffsetDelegate( |
| 115 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; | 115 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; |
| 116 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; | 116 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; |
| 117 virtual void ScrollEnd() OVERRIDE; | 117 virtual void ScrollEnd() OVERRIDE; |
| 118 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; | |
| 119 virtual void NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) OVERRIDE; | |
| 120 virtual void MouseMoveAt(gfx::Point viewport_point) OVERRIDE; | 118 virtual void MouseMoveAt(gfx::Point viewport_point) OVERRIDE; |
| 121 virtual void PinchGestureBegin() OVERRIDE; | 119 virtual void PinchGestureBegin() OVERRIDE; |
| 122 virtual void PinchGestureUpdate(float magnify_delta, | 120 virtual void PinchGestureUpdate(float magnify_delta, |
| 123 gfx::Point anchor) OVERRIDE; | 121 gfx::Point anchor) OVERRIDE; |
| 124 virtual void PinchGestureEnd() OVERRIDE; | 122 virtual void PinchGestureEnd() OVERRIDE; |
| 125 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, | 123 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, |
| 126 bool anchor_point, | 124 bool anchor_point, |
| 127 float page_scale, | 125 float page_scale, |
| 128 base::TimeDelta duration) OVERRIDE; | 126 base::TimeDelta duration) OVERRIDE; |
| 129 virtual void ScheduleAnimation() OVERRIDE; | 127 virtual void ScheduleAnimation() OVERRIDE; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 153 | 151 |
| 154 // RenderPassSink implementation. | 152 // RenderPassSink implementation. |
| 155 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; | 153 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; |
| 156 }; | 154 }; |
| 157 | 155 |
| 158 virtual void BeginCommit(); | 156 virtual void BeginCommit(); |
| 159 virtual void CommitComplete(); | 157 virtual void CommitComplete(); |
| 160 virtual void Animate(base::TimeTicks monotonic_time, | 158 virtual void Animate(base::TimeTicks monotonic_time, |
| 161 base::Time wall_clock_time); | 159 base::Time wall_clock_time); |
| 162 virtual void UpdateAnimationState(bool start_ready_animations); | 160 virtual void UpdateAnimationState(bool start_ready_animations); |
| 163 void MainThreadHasStoppedFlinging(); | |
| 164 void UpdateBackgroundAnimateTicking(bool should_background_tick); | 161 void UpdateBackgroundAnimateTicking(bool should_background_tick); |
| 165 void SetViewportDamage(gfx::Rect damage_rect); | 162 void SetViewportDamage(gfx::Rect damage_rect); |
| 166 | 163 |
| 167 virtual void ManageTiles(); | 164 virtual void ManageTiles(); |
| 168 | 165 |
| 169 // Returns false if problems occured preparing the frame, and we should try | 166 // Returns false if problems occured preparing the frame, and we should try |
| 170 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers | 167 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers |
| 171 // must also be called, regardless of whether DrawLayers is called between the | 168 // must also be called, regardless of whether DrawLayers is called between the |
| 172 // two. | 169 // two. |
| 173 virtual bool PrepareToDraw(FrameData* frame, | 170 virtual bool PrepareToDraw(FrameData* frame, |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 361 } |
| 365 size_t RenderPassListNext(size_t it) const { return it + 1; } | 362 size_t RenderPassListNext(size_t it) const { return it + 1; } |
| 366 }; | 363 }; |
| 367 | 364 |
| 368 template <typename RenderPassCuller> | 365 template <typename RenderPassCuller> |
| 369 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); | 366 static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); |
| 370 | 367 |
| 371 gfx::Vector2dF accumulated_root_overscroll() const { | 368 gfx::Vector2dF accumulated_root_overscroll() const { |
| 372 return accumulated_root_overscroll_; | 369 return accumulated_root_overscroll_; |
| 373 } | 370 } |
| 374 gfx::Vector2dF current_fling_velocity() const { | |
| 375 return current_fling_velocity_; | |
| 376 } | |
| 377 | 371 |
| 378 bool pinch_gesture_active() const { return pinch_gesture_active_; } | 372 bool pinch_gesture_active() const { return pinch_gesture_active_; } |
| 379 | 373 |
| 380 void SetTreePriority(TreePriority priority); | 374 void SetTreePriority(TreePriority priority); |
| 381 | 375 |
| 382 void ResetCurrentFrameTimeForNextFrame(); | 376 void ResetCurrentFrameTimeForNextFrame(); |
| 383 virtual base::TimeTicks CurrentFrameTimeTicks(); | 377 virtual base::TimeTicks CurrentFrameTimeTicks(); |
| 384 base::Time CurrentFrameTime(); | 378 base::Time CurrentFrameTime(); |
| 385 | 379 |
| 386 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; | 380 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 bool tile_priorities_dirty_; | 530 bool tile_priorities_dirty_; |
| 537 | 531 |
| 538 // The optional delegate for the root layer scroll offset. | 532 // The optional delegate for the root layer scroll offset. |
| 539 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 533 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 540 LayerTreeSettings settings_; | 534 LayerTreeSettings settings_; |
| 541 LayerTreeDebugState debug_state_; | 535 LayerTreeDebugState debug_state_; |
| 542 bool visible_; | 536 bool visible_; |
| 543 ManagedMemoryPolicy cached_managed_memory_policy_; | 537 ManagedMemoryPolicy cached_managed_memory_policy_; |
| 544 | 538 |
| 545 gfx::Vector2dF accumulated_root_overscroll_; | 539 gfx::Vector2dF accumulated_root_overscroll_; |
| 546 gfx::Vector2dF current_fling_velocity_; | |
| 547 | 540 |
| 548 bool pinch_gesture_active_; | 541 bool pinch_gesture_active_; |
| 549 bool pinch_gesture_end_should_clear_scrolling_layer_; | 542 bool pinch_gesture_end_should_clear_scrolling_layer_; |
| 550 gfx::Point previous_pinch_anchor_; | 543 gfx::Point previous_pinch_anchor_; |
| 551 | 544 |
| 552 // This is set by AnimateLayers() and used by UpdateAnimationState() | 545 // This is set by AnimateLayers() and used by UpdateAnimationState() |
| 553 // when sending animation events to the main thread. | 546 // when sending animation events to the main thread. |
| 554 base::Time last_animation_time_; | 547 base::Time last_animation_time_; |
| 555 | 548 |
| 556 scoped_ptr<TopControlsManager> top_controls_manager_; | 549 scoped_ptr<TopControlsManager> top_controls_manager_; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 base::Closure tree_activation_callback_; | 618 base::Closure tree_activation_callback_; |
| 626 | 619 |
| 627 SharedBitmapManager* shared_bitmap_manager_; | 620 SharedBitmapManager* shared_bitmap_manager_; |
| 628 | 621 |
| 629 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 622 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 630 }; | 623 }; |
| 631 | 624 |
| 632 } // namespace cc | 625 } // namespace cc |
| 633 | 626 |
| 634 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 627 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |