| 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 <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <unordered_map> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/containers/hash_tables.h" | |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "cc/animation/animation_registrar.h" | 18 #include "cc/animation/animation_registrar.h" |
| 19 #include "cc/animation/scrollbar_animation_controller.h" | 19 #include "cc/animation/scrollbar_animation_controller.h" |
| 20 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
| 21 #include "cc/base/synced_property.h" | 21 #include "cc/base/synced_property.h" |
| 22 #include "cc/debug/frame_timing_tracker.h" | 22 #include "cc/debug/frame_timing_tracker.h" |
| 23 #include "cc/debug/micro_benchmark_controller_impl.h" | 23 #include "cc/debug/micro_benchmark_controller_impl.h" |
| 24 #include "cc/input/input_handler.h" | 24 #include "cc/input/input_handler.h" |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 void UpdateRootLayerStateForSynchronousInputHandler(); | 699 void UpdateRootLayerStateForSynchronousInputHandler(); |
| 700 | 700 |
| 701 void ScrollAnimationAbort(LayerImpl* layer_impl); | 701 void ScrollAnimationAbort(LayerImpl* layer_impl); |
| 702 | 702 |
| 703 void ScrollAnimationCreate(LayerImpl* layer_impl, | 703 void ScrollAnimationCreate(LayerImpl* layer_impl, |
| 704 const gfx::ScrollOffset& target_offset, | 704 const gfx::ScrollOffset& target_offset, |
| 705 const gfx::ScrollOffset& current_offset); | 705 const gfx::ScrollOffset& current_offset); |
| 706 bool ScrollAnimationUpdateTarget(LayerImpl* layer_impl, | 706 bool ScrollAnimationUpdateTarget(LayerImpl* layer_impl, |
| 707 const gfx::Vector2dF& scroll_delta); | 707 const gfx::Vector2dF& scroll_delta); |
| 708 | 708 |
| 709 typedef base::hash_map<UIResourceId, UIResourceData> | 709 using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>; |
| 710 UIResourceMap; | |
| 711 UIResourceMap ui_resource_map_; | 710 UIResourceMap ui_resource_map_; |
| 712 | 711 |
| 713 // Resources that were evicted by EvictAllUIResources. Resources are removed | 712 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 714 // from this when they are touched by a create or destroy from the UI resource | 713 // from this when they are touched by a create or destroy from the UI resource |
| 715 // request queue. | 714 // request queue. |
| 716 std::set<UIResourceId> evicted_ui_resources_; | 715 std::set<UIResourceId> evicted_ui_resources_; |
| 717 | 716 |
| 718 OutputSurface* output_surface_; | 717 OutputSurface* output_surface_; |
| 719 | 718 |
| 720 scoped_ptr<ResourceProvider> resource_provider_; | 719 scoped_ptr<ResourceProvider> resource_provider_; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 bool resourceless_software_draw_; | 801 bool resourceless_software_draw_; |
| 803 | 802 |
| 804 gfx::Rect viewport_damage_rect_; | 803 gfx::Rect viewport_damage_rect_; |
| 805 | 804 |
| 806 scoped_ptr<AnimationRegistrar> animation_registrar_; | 805 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 807 scoped_ptr<AnimationHost> animation_host_; | 806 scoped_ptr<AnimationHost> animation_host_; |
| 808 std::set<VideoFrameController*> video_frame_controllers_; | 807 std::set<VideoFrameController*> video_frame_controllers_; |
| 809 | 808 |
| 810 // Map from scroll layer ID to scrollbar animation controller. | 809 // Map from scroll layer ID to scrollbar animation controller. |
| 811 // There is one animation controller per pair of overlay scrollbars. | 810 // There is one animation controller per pair of overlay scrollbars. |
| 812 base::ScopedPtrHashMap<int, scoped_ptr<ScrollbarAnimationController>> | 811 std::unordered_map<int, scoped_ptr<ScrollbarAnimationController>> |
| 813 scrollbar_animation_controllers_; | 812 scrollbar_animation_controllers_; |
| 814 | 813 |
| 815 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 814 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 816 MicroBenchmarkControllerImpl micro_benchmark_controller_; | 815 MicroBenchmarkControllerImpl micro_benchmark_controller_; |
| 817 scoped_ptr<SynchronousTaskGraphRunner> | 816 scoped_ptr<SynchronousTaskGraphRunner> |
| 818 single_thread_synchronous_task_graph_runner_; | 817 single_thread_synchronous_task_graph_runner_; |
| 819 | 818 |
| 820 // Optional callback to notify of new tree activations. | 819 // Optional callback to notify of new tree activations. |
| 821 base::Closure tree_activation_callback_; | 820 base::Closure tree_activation_callback_; |
| 822 | 821 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 833 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 832 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 834 | 833 |
| 835 scoped_ptr<Viewport> viewport_; | 834 scoped_ptr<Viewport> viewport_; |
| 836 | 835 |
| 837 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 836 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 838 }; | 837 }; |
| 839 | 838 |
| 840 } // namespace cc | 839 } // namespace cc |
| 841 | 840 |
| 842 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 841 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |