| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 base::TimeDelta delay) = 0; | 119 base::TimeDelta delay) = 0; |
| 120 virtual void DidActivateSyncTree() = 0; | 120 virtual void DidActivateSyncTree() = 0; |
| 121 virtual void DidPrepareTiles() = 0; | 121 virtual void DidPrepareTiles() = 0; |
| 122 | 122 |
| 123 // Called when page scale animation has completed on the impl thread. | 123 // Called when page scale animation has completed on the impl thread. |
| 124 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; | 124 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; |
| 125 | 125 |
| 126 // Called when output surface asks for a draw. | 126 // Called when output surface asks for a draw. |
| 127 virtual void OnDrawForOutputSurface() = 0; | 127 virtual void OnDrawForOutputSurface() = 0; |
| 128 | 128 |
| 129 virtual void PostFrameTimingEventsOnImplThread( |
| 130 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 131 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) = 0; |
| 132 |
| 129 protected: | 133 protected: |
| 130 virtual ~LayerTreeHostImplClient() {} | 134 virtual ~LayerTreeHostImplClient() {} |
| 131 }; | 135 }; |
| 132 | 136 |
| 133 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 137 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 134 // state. | 138 // state. |
| 135 class CC_EXPORT LayerTreeHostImpl | 139 class CC_EXPORT LayerTreeHostImpl |
| 136 : public InputHandler, | 140 : public InputHandler, |
| 137 public RendererClient, | 141 public RendererClient, |
| 138 public TileManagerClient, | 142 public TileManagerClient, |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 // |expected_next_main_frame_args| is the BeginFrameArgs of the frame that | 534 // |expected_next_main_frame_args| is the BeginFrameArgs of the frame that |
| 531 // follows the completion of the main frame (whether it is activation or some | 535 // follows the completion of the main frame (whether it is activation or some |
| 532 // other completion, such as early out). Note that if there is a main frame | 536 // other completion, such as early out). Note that if there is a main frame |
| 533 // scheduled in that frame, then this BeginFrameArgs will become the main | 537 // scheduled in that frame, then this BeginFrameArgs will become the main |
| 534 // frame args. However, if no such frame is scheduled, then this _would_ be | 538 // frame args. However, if no such frame is scheduled, then this _would_ be |
| 535 // the main frame args if it was scheduled. | 539 // the main frame args if it was scheduled. |
| 536 void RecordMainFrameTiming( | 540 void RecordMainFrameTiming( |
| 537 const BeginFrameArgs& start_of_main_frame_args, | 541 const BeginFrameArgs& start_of_main_frame_args, |
| 538 const BeginFrameArgs& expected_next_main_frame_args); | 542 const BeginFrameArgs& expected_next_main_frame_args); |
| 539 | 543 |
| 544 // Post the given frame timing events to the requester. |
| 545 void PostFrameTimingEvents( |
| 546 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 547 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); |
| 548 |
| 540 protected: | 549 protected: |
| 541 LayerTreeHostImpl( | 550 LayerTreeHostImpl( |
| 542 const LayerTreeSettings& settings, | 551 const LayerTreeSettings& settings, |
| 543 LayerTreeHostImplClient* client, | 552 LayerTreeHostImplClient* client, |
| 544 Proxy* proxy, | 553 Proxy* proxy, |
| 545 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 554 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 546 SharedBitmapManager* shared_bitmap_manager, | 555 SharedBitmapManager* shared_bitmap_manager, |
| 547 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 556 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 548 TaskGraphRunner* task_graph_runner, | 557 TaskGraphRunner* task_graph_runner, |
| 549 int id); | 558 int id); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 774 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 766 | 775 |
| 767 scoped_ptr<Viewport> viewport_; | 776 scoped_ptr<Viewport> viewport_; |
| 768 | 777 |
| 769 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 778 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 770 }; | 779 }; |
| 771 | 780 |
| 772 } // namespace cc | 781 } // namespace cc |
| 773 | 782 |
| 774 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 783 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |