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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 TreePriority tree_priority) override; | 349 TreePriority tree_priority) override; |
350 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override; | 350 void SetIsLikelyToRequireADraw(bool is_likely_to_require_a_draw) override; |
351 gfx::ColorSpace GetTileColorSpace() const override; | 351 gfx::ColorSpace GetTileColorSpace() const override; |
352 | 352 |
353 // ScrollbarAnimationControllerClient implementation. | 353 // ScrollbarAnimationControllerClient implementation. |
354 void PostDelayedScrollbarAnimationTask(const base::Closure& task, | 354 void PostDelayedScrollbarAnimationTask(const base::Closure& task, |
355 base::TimeDelta delay) override; | 355 base::TimeDelta delay) override; |
356 void SetNeedsAnimateForScrollbarAnimation() override; | 356 void SetNeedsAnimateForScrollbarAnimation() override; |
357 void SetNeedsRedrawForScrollbarAnimation() override; | 357 void SetNeedsRedrawForScrollbarAnimation() override; |
358 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; | 358 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const override; |
| 359 void SetScrollbarsHidden(int layer_id, bool hidden) override; |
359 | 360 |
360 // VideoBeginFrameSource implementation. | 361 // VideoBeginFrameSource implementation. |
361 void AddVideoFrameController(VideoFrameController* controller) override; | 362 void AddVideoFrameController(VideoFrameController* controller) override; |
362 void RemoveVideoFrameController(VideoFrameController* controller) override; | 363 void RemoveVideoFrameController(VideoFrameController* controller) override; |
363 | 364 |
364 // CompositorFrameSinkClient implementation. | 365 // CompositorFrameSinkClient implementation. |
365 void SetBeginFrameSource(BeginFrameSource* source) override; | 366 void SetBeginFrameSource(BeginFrameSource* source) override; |
366 void SetExternalTilePriorityConstraints( | 367 void SetExternalTilePriorityConstraints( |
367 const gfx::Rect& viewport_rect, | 368 const gfx::Rect& viewport_rect, |
368 const gfx::Transform& transform) override; | 369 const gfx::Transform& transform) override; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 gfx::Rect viewport_damage_rect_; | 800 gfx::Rect viewport_damage_rect_; |
800 | 801 |
801 std::unique_ptr<AnimationHost> animation_host_; | 802 std::unique_ptr<AnimationHost> animation_host_; |
802 std::set<VideoFrameController*> video_frame_controllers_; | 803 std::set<VideoFrameController*> video_frame_controllers_; |
803 | 804 |
804 // Map from scroll layer ID to scrollbar animation controller. | 805 // Map from scroll layer ID to scrollbar animation controller. |
805 // There is one animation controller per pair of overlay scrollbars. | 806 // There is one animation controller per pair of overlay scrollbars. |
806 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> | 807 std::unordered_map<int, std::unique_ptr<ScrollbarAnimationController>> |
807 scrollbar_animation_controllers_; | 808 scrollbar_animation_controllers_; |
808 | 809 |
| 810 // A map of scroll layers whose scrollbars have been hidden or shown since |
| 811 // the last commit. This gets cleared every commit so only changes are sent |
| 812 // back to the main thread. |
| 813 std::unordered_map<int, bool> scrollbars_hidden_map_; |
| 814 |
809 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 815 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
810 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 816 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
811 std::unique_ptr<SynchronousTaskGraphRunner> | 817 std::unique_ptr<SynchronousTaskGraphRunner> |
812 single_thread_synchronous_task_graph_runner_; | 818 single_thread_synchronous_task_graph_runner_; |
813 | 819 |
814 // Optional callback to notify of new tree activations. | 820 // Optional callback to notify of new tree activations. |
815 base::Closure tree_activation_callback_; | 821 base::Closure tree_activation_callback_; |
816 | 822 |
817 SharedBitmapManager* shared_bitmap_manager_; | 823 SharedBitmapManager* shared_bitmap_manager_; |
818 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 824 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
(...skipping 15 matching lines...) Expand all Loading... |
834 | 840 |
835 std::unique_ptr<PendingTreeDurationHistogramTimer> | 841 std::unique_ptr<PendingTreeDurationHistogramTimer> |
836 pending_tree_duration_timer_; | 842 pending_tree_duration_timer_; |
837 | 843 |
838 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
839 }; | 845 }; |
840 | 846 |
841 } // namespace cc | 847 } // namespace cc |
842 | 848 |
843 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |