OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PROXY_MAIN_H_ | 5 #ifndef CC_TREES_PROXY_MAIN_H_ |
6 #define CC_TREES_PROXY_MAIN_H_ | 6 #define CC_TREES_PROXY_MAIN_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/input/top_controls_state.h" | 10 #include "cc/input/top_controls_state.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Commits between the main and impl threads are processed through a pipeline | 42 // Commits between the main and impl threads are processed through a pipeline |
43 // with the following stages. For efficiency we can early out at any stage if | 43 // with the following stages. For efficiency we can early out at any stage if |
44 // we decide that no further processing is necessary. | 44 // we decide that no further processing is necessary. |
45 enum CommitPipelineStage { | 45 enum CommitPipelineStage { |
46 NO_PIPELINE_STAGE, | 46 NO_PIPELINE_STAGE, |
47 ANIMATE_PIPELINE_STAGE, | 47 ANIMATE_PIPELINE_STAGE, |
48 UPDATE_LAYERS_PIPELINE_STAGE, | 48 UPDATE_LAYERS_PIPELINE_STAGE, |
49 COMMIT_PIPELINE_STAGE, | 49 COMMIT_PIPELINE_STAGE, |
50 }; | 50 }; |
51 | 51 |
52 // Virtual for testing. | 52 void DidCompleteSwapBuffers(); |
53 virtual void DidCompleteSwapBuffers(); | 53 void SetRendererCapabilities(const RendererCapabilities& capabilities); |
54 virtual void SetRendererCapabilities( | 54 void BeginMainFrameNotExpectedSoon(); |
55 const RendererCapabilities& capabilities); | 55 void DidCommitAndDrawFrame(); |
56 virtual void BeginMainFrameNotExpectedSoon(); | 56 void SetAnimationEvents(std::unique_ptr<AnimationEvents> events); |
57 virtual void DidCommitAndDrawFrame(); | 57 void DidLoseOutputSurface(); |
58 virtual void SetAnimationEvents(std::unique_ptr<AnimationEvents> events); | 58 void RequestNewOutputSurface(); |
59 virtual void DidLoseOutputSurface(); | 59 void DidInitializeOutputSurface(bool success, |
60 virtual void RequestNewOutputSurface(); | 60 const RendererCapabilities& capabilities); |
61 virtual void DidInitializeOutputSurface( | 61 void DidCompletePageScaleAnimation(); |
62 bool success, | 62 void BeginMainFrame( |
63 const RendererCapabilities& capabilities); | |
64 virtual void DidCompletePageScaleAnimation(); | |
65 virtual void BeginMainFrame( | |
66 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 63 std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
67 | 64 |
68 ChannelMain* channel_main() const { return channel_main_.get(); } | 65 ChannelMain* channel_main() const { return channel_main_.get(); } |
69 CommitPipelineStage max_requested_pipeline_stage() const { | 66 CommitPipelineStage max_requested_pipeline_stage() const { |
70 return max_requested_pipeline_stage_; | 67 return max_requested_pipeline_stage_; |
71 } | 68 } |
72 CommitPipelineStage current_pipeline_stage() const { | 69 CommitPipelineStage current_pipeline_stage() const { |
73 return current_pipeline_stage_; | 70 return current_pipeline_stage_; |
74 } | 71 } |
75 CommitPipelineStage final_pipeline_stage() const { | 72 CommitPipelineStage final_pipeline_stage() const { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 RendererCapabilities renderer_capabilities_; | 144 RendererCapabilities renderer_capabilities_; |
148 | 145 |
149 std::unique_ptr<ChannelMain> channel_main_; | 146 std::unique_ptr<ChannelMain> channel_main_; |
150 | 147 |
151 DISALLOW_COPY_AND_ASSIGN(ProxyMain); | 148 DISALLOW_COPY_AND_ASSIGN(ProxyMain); |
152 }; | 149 }; |
153 | 150 |
154 } // namespace cc | 151 } // namespace cc |
155 | 152 |
156 #endif // CC_TREES_PROXY_MAIN_H_ | 153 #endif // CC_TREES_PROXY_MAIN_H_ |
OLD | NEW |