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

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

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings::ToProtobuf, update comments. Created 5 years 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
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_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/animation/animation_events.h" 9 #include "cc/animation/animation_events.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/debug/frame_timing_tracker.h" 11 #include "cc/debug/frame_timing_tracker.h"
12 #include "cc/input/top_controls_state.h" 12 #include "cc/input/top_controls_state.h"
13 #include "cc/output/output_surface.h" 13 #include "cc/output/output_surface.h"
14 #include "cc/output/renderer_capabilities.h" 14 #include "cc/output/renderer_capabilities.h"
15 #include "cc/trees/channel_main.h" 15 #include "cc/trees/channel_main.h"
16 #include "cc/trees/proxy.h" 16 #include "cc/trees/proxy.h"
17 #include "cc/trees/proxy_common.h" 17 #include "cc/trees/proxy_common.h"
18 #include "cc/trees/remote_proto_channel.h"
18 19
19 namespace cc { 20 namespace cc {
20 class BeginFrameSource; 21 class BeginFrameSource;
21 class ChannelMain; 22 class ChannelMain;
22 class LayerTreeHost; 23 class LayerTreeHost;
23 24
24 // This class aggregates all interactions that the impl side of the compositor 25 // This class aggregates all interactions that the impl side of the compositor
25 // needs to have with the main side. 26 // needs to have with the main side.
26 // The class is created and lives on the main thread. 27 // The class is created and lives on the main thread.
27 class CC_EXPORT ProxyMain : public Proxy { 28 class CC_EXPORT ProxyMain : public Proxy {
28 public: 29 public:
29 static scoped_ptr<ProxyMain> CreateThreaded( 30 static scoped_ptr<ProxyMain> CreateThreaded(
30 LayerTreeHost* layer_tree_host, 31 LayerTreeHost* layer_tree_host,
31 TaskRunnerProvider* task_runner_provider, 32 TaskRunnerProvider* task_runner_provider,
32 scoped_ptr<BeginFrameSource> external_begin_frame_source); 33 scoped_ptr<BeginFrameSource> external_begin_frame_source);
33 34
35 static scoped_ptr<ProxyMain> CreateRemote(
36 RemoteProtoChannel* remote_proto_channel,
37 LayerTreeHost* layer_tree_host,
38 TaskRunnerProvider* task_runner_provider);
39
34 ~ProxyMain() override; 40 ~ProxyMain() override;
35 41
36 // 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
37 // 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
38 // we decide that no further processing is necessary. 44 // we decide that no further processing is necessary.
39 enum CommitPipelineStage { 45 enum CommitPipelineStage {
40 NO_PIPELINE_STAGE, 46 NO_PIPELINE_STAGE,
41 ANIMATE_PIPELINE_STAGE, 47 ANIMATE_PIPELINE_STAGE,
42 UPDATE_LAYERS_PIPELINE_STAGE, 48 UPDATE_LAYERS_PIPELINE_STAGE,
43 COMMIT_PIPELINE_STAGE, 49 COMMIT_PIPELINE_STAGE,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 scoped_ptr<BeginFrameSource> external_begin_frame_source_; 158 scoped_ptr<BeginFrameSource> external_begin_frame_source_;
153 159
154 scoped_ptr<ChannelMain> channel_main_; 160 scoped_ptr<ChannelMain> channel_main_;
155 161
156 DISALLOW_COPY_AND_ASSIGN(ProxyMain); 162 DISALLOW_COPY_AND_ASSIGN(ProxyMain);
157 }; 163 };
158 164
159 } // namespace cc 165 } // namespace cc
160 166
161 #endif // CC_TREES_PROXY_MAIN_H_ 167 #endif // CC_TREES_PROXY_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698