Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: cc/trees/channel_main.h

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/begin_frame_source.h"
13 #include "cc/scheduler/commit_earlyout_reason.h" 13 #include "cc/scheduler/commit_earlyout_reason.h"
14 #include "cc/trees/proxy_common.h" 14 #include "cc/trees/proxy_common.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class LayerTreeMutator;
19
18 // ChannelMain and ChannelImpl provide an abstract communication layer for 20 // ChannelMain and ChannelImpl provide an abstract communication layer for
19 // the main and impl side of the compositor. 21 // the main and impl side of the compositor.
20 // 22 //
21 // The communication sequence between the 2 sides is: 23 // The communication sequence between the 2 sides is:
22 // 24 //
23 // LayerTreeHost<-->ProxyMain<-->ChannelMain 25 // LayerTreeHost<-->ProxyMain<-->ChannelMain
24 // | 26 // |
25 // | 27 // |
26 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl 28 // ChannelImpl<-->ProxyImpl<-->LayerTreeHostImpl
27 29
28 class CC_EXPORT ChannelMain { 30 class CC_EXPORT ChannelMain {
29 public: 31 public:
30 virtual ~ChannelMain() {} 32 virtual ~ChannelMain() {}
31 33
32 // Interface for commands sent to ProxyImpl 34 // Interface for commands sent to ProxyImpl
33 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; 35 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0;
34 virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints, 36 virtual void UpdateTopControlsStateOnImpl(TopControlsState constraints,
35 TopControlsState current, 37 TopControlsState current,
36 bool animate) = 0; 38 bool animate) = 0;
37 virtual void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) = 0; 39 virtual void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) = 0;
40 virtual void InitializeMutatorOnImpl(LayerTreeMutator* mutator) = 0;
38 virtual void MainThreadHasStoppedFlingingOnImpl() = 0; 41 virtual void MainThreadHasStoppedFlingingOnImpl() = 0;
39 virtual void SetInputThrottledUntilCommitOnImpl(bool is_throttled) = 0; 42 virtual void SetInputThrottledUntilCommitOnImpl(bool is_throttled) = 0;
40 virtual void SetDeferCommitsOnImpl(bool defer_commits) = 0; 43 virtual void SetDeferCommitsOnImpl(bool defer_commits) = 0;
41 virtual void FinishAllRenderingOnImpl(CompletionEvent* completion) = 0; 44 virtual void FinishAllRenderingOnImpl(CompletionEvent* completion) = 0;
42 virtual void SetVisibleOnImpl(bool visible) = 0; 45 virtual void SetVisibleOnImpl(bool visible) = 0;
43 virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) = 0; 46 virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) = 0;
44 virtual void MainFrameWillHappenOnImplForTesting( 47 virtual void MainFrameWillHappenOnImplForTesting(
45 CompletionEvent* completion, 48 CompletionEvent* completion,
46 bool* main_frame_will_happen) = 0; 49 bool* main_frame_will_happen) = 0;
47 virtual void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) = 0; 50 virtual void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) = 0;
(...skipping 11 matching lines...) Expand all
59 LayerTreeHost* layer_tree_host, 62 LayerTreeHost* layer_tree_host,
60 scoped_ptr<BeginFrameSource> external_begin_frame_source) = 0; 63 scoped_ptr<BeginFrameSource> external_begin_frame_source) = 0;
61 64
62 // Must be called before deleting the channel. 65 // Must be called before deleting the channel.
63 virtual void SynchronouslyCloseImpl() = 0; 66 virtual void SynchronouslyCloseImpl() = 0;
64 }; 67 };
65 68
66 } // namespace cc 69 } // namespace cc
67 70
68 #endif // CC_TREES_CHANNEL_MAIN_H_ 71 #endif // CC_TREES_CHANNEL_MAIN_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698