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

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: Addresed comments. 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
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 33
34 static scoped_ptr<ProxyMain> CreateRemote(
35 RemoteProtoChannel* remote_proto_channel,
36 LayerTreeHost* layer_tree_host,
37 TaskRunnerProvider* task_runner_provider);
38
33 ~ProxyMain() override; 39 ~ProxyMain() override;
34 40
35 // Commits between the main and impl threads are processed through a pipeline 41 // Commits between the main and impl threads are processed through a pipeline
36 // with the following stages. For efficiency we can early out at any stage if 42 // with the following stages. For efficiency we can early out at any stage if
37 // we decide that no further processing is necessary. 43 // we decide that no further processing is necessary.
38 enum CommitPipelineStage { 44 enum CommitPipelineStage {
39 NO_PIPELINE_STAGE, 45 NO_PIPELINE_STAGE,
40 ANIMATE_PIPELINE_STAGE, 46 ANIMATE_PIPELINE_STAGE,
41 UPDATE_LAYERS_PIPELINE_STAGE, 47 UPDATE_LAYERS_PIPELINE_STAGE,
42 COMMIT_PIPELINE_STAGE, 48 COMMIT_PIPELINE_STAGE,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 RendererCapabilities renderer_capabilities_; 150 RendererCapabilities renderer_capabilities_;
145 151
146 scoped_ptr<ChannelMain> channel_main_; 152 scoped_ptr<ChannelMain> channel_main_;
147 153
148 DISALLOW_COPY_AND_ASSIGN(ProxyMain); 154 DISALLOW_COPY_AND_ASSIGN(ProxyMain);
149 }; 155 };
150 156
151 } // namespace cc 157 } // namespace cc
152 158
153 #endif // CC_TREES_PROXY_MAIN_H_ 159 #endif // CC_TREES_PROXY_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698