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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 public TileManagerClient, | 97 public TileManagerClient, |
98 public OutputSurfaceClient, | 98 public OutputSurfaceClient, |
99 public TopControlsManagerClient, | 99 public TopControlsManagerClient, |
100 public base::SupportsWeakPtr<LayerTreeHostImpl> { | 100 public base::SupportsWeakPtr<LayerTreeHostImpl> { |
101 public: | 101 public: |
102 static scoped_ptr<LayerTreeHostImpl> Create( | 102 static scoped_ptr<LayerTreeHostImpl> Create( |
103 const LayerTreeSettings& settings, | 103 const LayerTreeSettings& settings, |
104 LayerTreeHostImplClient* client, | 104 LayerTreeHostImplClient* client, |
105 Proxy* proxy, | 105 Proxy* proxy, |
106 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 106 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
107 SharedBitmapManager* manager); | 107 SharedBitmapManager* manager, |
| 108 int id); |
108 virtual ~LayerTreeHostImpl(); | 109 virtual ~LayerTreeHostImpl(); |
109 | 110 |
110 // InputHandler implementation | 111 // InputHandler implementation |
111 virtual void BindToClient(InputHandlerClient* client) OVERRIDE; | 112 virtual void BindToClient(InputHandlerClient* client) OVERRIDE; |
112 virtual InputHandler::ScrollStatus ScrollBegin( | 113 virtual InputHandler::ScrollStatus ScrollBegin( |
113 gfx::Point viewport_point, | 114 gfx::Point viewport_point, |
114 InputHandler::ScrollInputType type) OVERRIDE; | 115 InputHandler::ScrollInputType type) OVERRIDE; |
115 virtual bool ScrollBy(gfx::Point viewport_point, | 116 virtual bool ScrollBy(gfx::Point viewport_point, |
116 gfx::Vector2dF scroll_delta) OVERRIDE; | 117 gfx::Vector2dF scroll_delta) OVERRIDE; |
117 virtual bool ScrollVerticallyByPage(gfx::Point viewport_point, | 118 virtual bool ScrollVerticallyByPage(gfx::Point viewport_point, |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 void ScheduleMicroBenchmark(scoped_ptr<MicroBenchmarkImpl> benchmark); | 417 void ScheduleMicroBenchmark(scoped_ptr<MicroBenchmarkImpl> benchmark); |
417 | 418 |
418 CompositorFrameMetadata MakeCompositorFrameMetadata() const; | 419 CompositorFrameMetadata MakeCompositorFrameMetadata() const; |
419 | 420 |
420 protected: | 421 protected: |
421 LayerTreeHostImpl( | 422 LayerTreeHostImpl( |
422 const LayerTreeSettings& settings, | 423 const LayerTreeSettings& settings, |
423 LayerTreeHostImplClient* client, | 424 LayerTreeHostImplClient* client, |
424 Proxy* proxy, | 425 Proxy* proxy, |
425 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 426 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
426 SharedBitmapManager* manager); | 427 SharedBitmapManager* manager, |
| 428 int id); |
427 | 429 |
428 // Virtual for testing. | 430 // Virtual for testing. |
429 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 431 virtual void AnimateLayers(base::TimeTicks monotonic_time, |
430 base::Time wall_clock_time); | 432 base::Time wall_clock_time); |
431 | 433 |
432 // Virtual for testing. | 434 // Virtual for testing. |
433 virtual base::TimeDelta LowFrequencyAnimationInterval() const; | 435 virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
434 | 436 |
435 const AnimationRegistrar::AnimationControllerMap& | 437 const AnimationRegistrar::AnimationControllerMap& |
436 active_animation_controllers() const { | 438 active_animation_controllers() const { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 632 |
631 bool need_to_update_visible_tiles_before_draw_; | 633 bool need_to_update_visible_tiles_before_draw_; |
632 #ifndef NDEBUG | 634 #ifndef NDEBUG |
633 bool did_lose_called_; | 635 bool did_lose_called_; |
634 #endif | 636 #endif |
635 | 637 |
636 // Optional callback to notify of new tree activations. | 638 // Optional callback to notify of new tree activations. |
637 base::Closure tree_activation_callback_; | 639 base::Closure tree_activation_callback_; |
638 | 640 |
639 SharedBitmapManager* shared_bitmap_manager_; | 641 SharedBitmapManager* shared_bitmap_manager_; |
| 642 int id_; |
640 | 643 |
641 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 644 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
642 }; | 645 }; |
643 | 646 |
644 } // namespace cc | 647 } // namespace cc |
645 | 648 |
646 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 649 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |