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