| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 bool contains_incomplete_tile; | 160 bool contains_incomplete_tile; |
| 161 bool has_no_damage; | 161 bool has_no_damage; |
| 162 | 162 |
| 163 // RenderPassSink implementation. | 163 // RenderPassSink implementation. |
| 164 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; | 164 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 virtual void BeginMainFrameAborted(bool did_handle); | 167 virtual void BeginMainFrameAborted(bool did_handle); |
| 168 virtual void BeginCommit(); | 168 virtual void BeginCommit(); |
| 169 virtual void CommitComplete(); | 169 virtual void CommitComplete(); |
| 170 virtual void Animate(base::TimeTicks monotonic_time, | 170 virtual void Animate(base::TimeTicks monotonic_time); |
| 171 base::Time wall_clock_time); | |
| 172 virtual void UpdateAnimationState(bool start_ready_animations); | 171 virtual void UpdateAnimationState(bool start_ready_animations); |
| 173 void MainThreadHasStoppedFlinging(); | 172 void MainThreadHasStoppedFlinging(); |
| 174 void UpdateBackgroundAnimateTicking(bool should_background_tick); | 173 void UpdateBackgroundAnimateTicking(bool should_background_tick); |
| 175 void DidAnimateScrollOffset(); | 174 void DidAnimateScrollOffset(); |
| 176 void SetViewportDamage(const gfx::Rect& damage_rect); | 175 void SetViewportDamage(const gfx::Rect& damage_rect); |
| 177 | 176 |
| 178 virtual void ManageTiles(); | 177 virtual void ManageTiles(); |
| 179 | 178 |
| 180 // Returns false if problems occured preparing the frame, and we should try | 179 // Returns false if problems occured preparing the frame, and we should try |
| 181 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers | 180 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 gfx::Vector2dF current_fling_velocity() const { | 383 gfx::Vector2dF current_fling_velocity() const { |
| 385 return current_fling_velocity_; | 384 return current_fling_velocity_; |
| 386 } | 385 } |
| 387 | 386 |
| 388 bool pinch_gesture_active() const { return pinch_gesture_active_; } | 387 bool pinch_gesture_active() const { return pinch_gesture_active_; } |
| 389 | 388 |
| 390 void SetTreePriority(TreePriority priority); | 389 void SetTreePriority(TreePriority priority); |
| 391 | 390 |
| 392 void ResetCurrentFrameTimeForNextFrame(); | 391 void ResetCurrentFrameTimeForNextFrame(); |
| 393 virtual base::TimeTicks CurrentFrameTimeTicks(); | 392 virtual base::TimeTicks CurrentFrameTimeTicks(); |
| 394 base::Time CurrentFrameTime(); | |
| 395 | 393 |
| 396 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; | 394 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; |
| 397 | 395 |
| 398 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } | 396 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } |
| 399 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; | 397 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; |
| 400 scoped_ptr<base::Value> ActivationStateAsValue() const; | 398 scoped_ptr<base::Value> ActivationStateAsValue() const; |
| 401 | 399 |
| 402 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 400 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
| 403 | 401 |
| 404 virtual void CreateUIResource(UIResourceId uid, | 402 virtual void CreateUIResource(UIResourceId uid, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 LayerTreeHostImplClient* client, | 439 LayerTreeHostImplClient* client, |
| 442 Proxy* proxy, | 440 Proxy* proxy, |
| 443 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 441 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 444 SharedBitmapManager* manager, | 442 SharedBitmapManager* manager, |
| 445 int id); | 443 int id); |
| 446 | 444 |
| 447 gfx::SizeF ComputeInnerViewportContainerSize() const; | 445 gfx::SizeF ComputeInnerViewportContainerSize() const; |
| 448 void UpdateInnerViewportContainerSize(); | 446 void UpdateInnerViewportContainerSize(); |
| 449 | 447 |
| 450 // Virtual for testing. | 448 // Virtual for testing. |
| 451 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 449 virtual void AnimateLayers(base::TimeTicks monotonic_time); |
| 452 base::Time wall_clock_time); | |
| 453 | 450 |
| 454 // Virtual for testing. | 451 // Virtual for testing. |
| 455 virtual base::TimeDelta LowFrequencyAnimationInterval() const; | 452 virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
| 456 | 453 |
| 457 const AnimationRegistrar::AnimationControllerMap& | 454 const AnimationRegistrar::AnimationControllerMap& |
| 458 active_animation_controllers() const { | 455 active_animation_controllers() const { |
| 459 return animation_registrar_->active_animation_controllers(); | 456 return animation_registrar_->active_animation_controllers(); |
| 460 } | 457 } |
| 461 | 458 |
| 462 bool manage_tiles_needed() const { return tile_priorities_dirty_; } | 459 bool manage_tiles_needed() const { return tile_priorities_dirty_; } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 void SendReleaseResourcesRecursive(LayerImpl* current); | 498 void SendReleaseResourcesRecursive(LayerImpl* current); |
| 502 bool EnsureRenderSurfaceLayerList(); | 499 bool EnsureRenderSurfaceLayerList(); |
| 503 void ClearCurrentlyScrollingLayer(); | 500 void ClearCurrentlyScrollingLayer(); |
| 504 | 501 |
| 505 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, | 502 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, |
| 506 const gfx::PointF& device_viewport_point); | 503 const gfx::PointF& device_viewport_point); |
| 507 | 504 |
| 508 void AnimateScrollbarsRecursive(LayerImpl* layer, | 505 void AnimateScrollbarsRecursive(LayerImpl* layer, |
| 509 base::TimeTicks time); | 506 base::TimeTicks time); |
| 510 | 507 |
| 511 void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const; | 508 void UpdateCurrentFrameTime(base::TimeTicks* ticks) const; |
| 512 | 509 |
| 513 LayerImpl* FindScrollLayerForDeviceViewportPoint( | 510 LayerImpl* FindScrollLayerForDeviceViewportPoint( |
| 514 const gfx::PointF& device_viewport_point, | 511 const gfx::PointF& device_viewport_point, |
| 515 InputHandler::ScrollInputType type, | 512 InputHandler::ScrollInputType type, |
| 516 LayerImpl* layer_hit_by_point, | 513 LayerImpl* layer_hit_by_point, |
| 517 bool* scroll_on_main_thread) const; | 514 bool* scroll_on_main_thread) const; |
| 518 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point, | 515 float DeviceSpaceDistanceToLayer(const gfx::PointF& device_viewport_point, |
| 519 LayerImpl* layer_impl); | 516 LayerImpl* layer_impl); |
| 520 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); | 517 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); |
| 521 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, | 518 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 // scrollable size.) | 631 // scrollable size.) |
| 635 gfx::Transform external_transform_; | 632 gfx::Transform external_transform_; |
| 636 gfx::Rect external_viewport_; | 633 gfx::Rect external_viewport_; |
| 637 gfx::Rect external_clip_; | 634 gfx::Rect external_clip_; |
| 638 bool device_viewport_valid_for_tile_management_; | 635 bool device_viewport_valid_for_tile_management_; |
| 639 bool external_stencil_test_enabled_; | 636 bool external_stencil_test_enabled_; |
| 640 | 637 |
| 641 gfx::Rect viewport_damage_rect_; | 638 gfx::Rect viewport_damage_rect_; |
| 642 | 639 |
| 643 base::TimeTicks current_frame_timeticks_; | 640 base::TimeTicks current_frame_timeticks_; |
| 644 base::Time current_frame_time_; | |
| 645 | 641 |
| 646 scoped_ptr<AnimationRegistrar> animation_registrar_; | 642 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 647 | 643 |
| 648 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 644 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 649 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 645 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
| 650 | 646 |
| 651 bool need_to_update_visible_tiles_before_draw_; | 647 bool need_to_update_visible_tiles_before_draw_; |
| 652 #ifndef NDEBUG | 648 #ifndef NDEBUG |
| 653 bool did_lose_called_; | 649 bool did_lose_called_; |
| 654 #endif | 650 #endif |
| 655 | 651 |
| 656 // Optional callback to notify of new tree activations. | 652 // Optional callback to notify of new tree activations. |
| 657 base::Closure tree_activation_callback_; | 653 base::Closure tree_activation_callback_; |
| 658 | 654 |
| 659 SharedBitmapManager* shared_bitmap_manager_; | 655 SharedBitmapManager* shared_bitmap_manager_; |
| 660 int id_; | 656 int id_; |
| 661 | 657 |
| 662 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 658 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 663 | 659 |
| 664 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 660 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 665 }; | 661 }; |
| 666 | 662 |
| 667 } // namespace cc | 663 } // namespace cc |
| 668 | 664 |
| 669 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 665 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |