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_CHANNEL_MAIN_H_ | 5 #ifndef CC_TREES_CHANNEL_MAIN_H_ |
6 #define CC_TREES_CHANNEL_MAIN_H_ | 6 #define CC_TREES_CHANNEL_MAIN_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/base/completion_event.h" |
| 10 #include "cc/output/output_surface.h" |
9 | 11 |
10 namespace cc { | 12 namespace cc { |
11 | |
12 // ChannelMain and ChannelImpl provide an abstract communication layer for | 13 // ChannelMain and ChannelImpl provide an abstract communication layer for |
13 // the main and impl side of the compositor. | 14 // the main and impl side of the compositor. |
14 // | 15 // |
15 // The communication sequence between the 2 sides is: | 16 // The communication sequence between the 2 sides is: |
16 // | 17 // |
17 // LayerTreeHost<-->ProxyMain<-->ChannelMain | 18 // LayerTreeHost<-->ProxyMain<-->ChannelMain |
18 // | | 19 // | |
19 // | | 20 // | |
20 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl | 21 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl |
21 | 22 |
22 class CC_EXPORT ChannelMain { | 23 class CC_EXPORT ChannelMain { |
23 public: | 24 public: |
24 // Interface for commands sent to the ProxyImpl | 25 // Interface for commands sent to the ProxyImpl |
25 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; | 26 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; |
| 27 virtual void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) = 0; |
| 28 virtual void MainThreadHasStoppedFlingingOnImpl() = 0; |
| 29 virtual void SetInputThrottledUntilCommitOnImpl(bool is_throttled) = 0; |
| 30 virtual void SetDeferCommitsOnImpl(bool defer_commits) = 0; |
| 31 virtual void FinishAllRenderingOnImpl(CompletionEvent* completion) = 0; |
| 32 virtual void SetVisibleOnImpl(CompletionEvent* completion, bool visible) = 0; |
| 33 virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) = 0; |
| 34 virtual void FinishGLOnImpl(CompletionEvent* completion) = 0; |
| 35 virtual void MainFrameWillHappenOnImplForTesting( |
| 36 CompletionEvent* completion, |
| 37 bool* main_frame_will_happen) = 0; |
26 | 38 |
27 virtual ~ChannelMain() {} | 39 virtual ~ChannelMain() {} |
28 }; | 40 }; |
29 | 41 |
30 } // namespace cc | 42 } // namespace cc |
31 | 43 |
32 #endif // CC_TREES_CHANNEL_MAIN_H_ | 44 #endif // CC_TREES_CHANNEL_MAIN_H_ |
OLD | NEW |