Chromium Code Reviews| 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" | 9 #include "cc/base/completion_event.h" |
| 10 #include "cc/input/top_controls_state.h" | 10 #include "cc/input/top_controls_state.h" |
| 11 #include "cc/output/output_surface.h" | 11 #include "cc/output/output_surface.h" |
| 12 #include "cc/scheduler/begin_frame_source.h" | |
| 12 #include "cc/scheduler/commit_earlyout_reason.h" | 13 #include "cc/scheduler/commit_earlyout_reason.h" |
| 13 #include "cc/trees/proxy_common.h" | 14 #include "cc/trees/proxy_common.h" |
| 14 | 15 |
| 15 namespace cc { | 16 namespace cc { |
| 17 | |
| 16 // ChannelMain and ChannelImpl provide an abstract communication layer for | 18 // ChannelMain and ChannelImpl provide an abstract communication layer for |
| 17 // the main and impl side of the compositor. | 19 // the main and impl side of the compositor. |
| 18 // | 20 // |
| 19 // The communication sequence between the 2 sides is: | 21 // The communication sequence between the 2 sides is: |
| 20 // | 22 // |
| 21 // LayerTreeHost<-->ProxyMain<-->ChannelMain | 23 // LayerTreeHost<-->ProxyMain<-->ChannelMain |
| 22 // | | 24 // | |
| 23 // | | 25 // | |
| 24 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl | 26 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl |
| 25 | 27 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 40 virtual void FinishGLOnImpl(CompletionEvent* completion) = 0; | 42 virtual void FinishGLOnImpl(CompletionEvent* completion) = 0; |
| 41 virtual void MainFrameWillHappenOnImplForTesting( | 43 virtual void MainFrameWillHappenOnImplForTesting( |
| 42 CompletionEvent* completion, | 44 CompletionEvent* completion, |
| 43 bool* main_frame_will_happen) = 0; | 45 bool* main_frame_will_happen) = 0; |
| 44 virtual void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) = 0; | 46 virtual void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) = 0; |
| 45 virtual void SetNeedsCommitOnImpl() = 0; | 47 virtual void SetNeedsCommitOnImpl() = 0; |
| 46 virtual void BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) = 0; | 48 virtual void BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) = 0; |
| 47 virtual void StartCommitOnImpl(CompletionEvent* completion, | 49 virtual void StartCommitOnImpl(CompletionEvent* completion, |
| 48 LayerTreeHost* layer_tree_host, | 50 LayerTreeHost* layer_tree_host, |
| 49 bool hold_commit_for_activation) = 0; | 51 bool hold_commit_for_activation) = 0; |
| 50 virtual void InitializeImplOnImpl(CompletionEvent* completion, | 52 |
| 51 LayerTreeHost* layer_tree_host) = 0; | 53 // Must be called before using the channel. |
| 52 virtual void LayerTreeHostClosedOnImpl(CompletionEvent* completion) = 0; | 54 virtual void InitializeImpl( |
| 55 CompletionEvent* completion, | |
| 56 LayerTreeHost* layer_tree_host, | |
| 57 scoped_ptr<BeginFrameSource> external_begin_frame_source) = 0; | |
| 58 // Must be called before deleting the channel. | |
| 59 virtual void CloseImpl(CompletionEvent* completion) = 0; | |
| 60 virtual bool IsInitialized() const = 0; | |
|
Wez
2015/11/10 01:41:50
nit: Suggest separating the three methods with bla
Khushal
2015/11/11 04:17:47
Done.
| |
| 53 | 61 |
| 54 virtual ~ChannelMain() {} | 62 virtual ~ChannelMain() {} |
| 55 }; | 63 }; |
| 56 | 64 |
| 57 } // namespace cc | 65 } // namespace cc |
| 58 | 66 |
| 59 #endif // CC_TREES_CHANNEL_MAIN_H_ | 67 #endif // CC_TREES_CHANNEL_MAIN_H_ |
| OLD | NEW |