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

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

Issue 2650303002: cc: Remove the LayerTreeHost abstraction. (Closed)
Patch Set: missed ui Created 3 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/trees/proxy_impl.cc ('k') | cc/trees/proxy_main.cc » ('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_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/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/input/browser_controls_state.h" 10 #include "cc/input/browser_controls_state.h"
11 #include "cc/trees/proxy.h" 11 #include "cc/trees/proxy.h"
12 #include "cc/trees/proxy_common.h" 12 #include "cc/trees/proxy_common.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class MutatorEvents; 16 class MutatorEvents;
17 class CompletionEvent; 17 class CompletionEvent;
18 class CompositorFrameSink; 18 class CompositorFrameSink;
19 class LayerTreeHostInProcess; 19 class LayerTreeHost;
20 class LayerTreeMutator; 20 class LayerTreeMutator;
21 class ProxyImpl; 21 class ProxyImpl;
22 22
23 // This class aggregates all interactions that the impl side of the compositor 23 // This class aggregates all interactions that the impl side of the compositor
24 // needs to have with the main side. 24 // needs to have with the main side.
25 // The class is created and lives on the main thread. 25 // The class is created and lives on the main thread.
26 class CC_EXPORT ProxyMain : public Proxy { 26 class CC_EXPORT ProxyMain : public Proxy {
27 public: 27 public:
28 ProxyMain(LayerTreeHostInProcess* layer_tree_host, 28 ProxyMain(LayerTreeHost* layer_tree_host,
29 TaskRunnerProvider* task_runner_provider); 29 TaskRunnerProvider* task_runner_provider);
30 30
31 ~ProxyMain() override; 31 ~ProxyMain() override;
32 32
33 // Commits between the main and impl threads are processed through a pipeline 33 // Commits between the main and impl threads are processed through a pipeline
34 // with the following stages. For efficiency we can early out at any stage if 34 // with the following stages. For efficiency we can early out at any stage if
35 // we decide that no further processing is necessary. 35 // we decide that no further processing is necessary.
36 enum CommitPipelineStage { 36 enum CommitPipelineStage {
37 NO_PIPELINE_STAGE, 37 NO_PIPELINE_STAGE,
38 ANIMATE_PIPELINE_STAGE, 38 ANIMATE_PIPELINE_STAGE,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // already outstanding. 91 // already outstanding.
92 bool SendCommitRequestToImplThreadIfNeeded( 92 bool SendCommitRequestToImplThreadIfNeeded(
93 CommitPipelineStage required_stage); 93 CommitPipelineStage required_stage);
94 bool IsMainThread() const; 94 bool IsMainThread() const;
95 bool IsImplThread() const; 95 bool IsImplThread() const;
96 base::SingleThreadTaskRunner* ImplThreadTaskRunner(); 96 base::SingleThreadTaskRunner* ImplThreadTaskRunner();
97 97
98 void InitializeOnImplThread(CompletionEvent* completion_event); 98 void InitializeOnImplThread(CompletionEvent* completion_event);
99 void DestroyProxyImplOnImplThread(CompletionEvent* completion_event); 99 void DestroyProxyImplOnImplThread(CompletionEvent* completion_event);
100 100
101 LayerTreeHostInProcess* layer_tree_host_; 101 LayerTreeHost* layer_tree_host_;
102 102
103 TaskRunnerProvider* task_runner_provider_; 103 TaskRunnerProvider* task_runner_provider_;
104 104
105 const int layer_tree_host_id_; 105 const int layer_tree_host_id_;
106 106
107 // The furthest pipeline stage which has been requested for the next 107 // The furthest pipeline stage which has been requested for the next
108 // commit. 108 // commit.
109 CommitPipelineStage max_requested_pipeline_stage_; 109 CommitPipelineStage max_requested_pipeline_stage_;
110 // The commit pipeline stage that is currently being processed. 110 // The commit pipeline stage that is currently being processed.
111 CommitPipelineStage current_pipeline_stage_; 111 CommitPipelineStage current_pipeline_stage_;
(...skipping 18 matching lines...) Expand all
130 std::unique_ptr<ProxyImpl> proxy_impl_; 130 std::unique_ptr<ProxyImpl> proxy_impl_;
131 131
132 base::WeakPtrFactory<ProxyMain> weak_factory_; 132 base::WeakPtrFactory<ProxyMain> weak_factory_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(ProxyMain); 134 DISALLOW_COPY_AND_ASSIGN(ProxyMain);
135 }; 135 };
136 136
137 } // namespace cc 137 } // namespace cc
138 138
139 #endif // CC_TREES_PROXY_MAIN_H_ 139 #endif // CC_TREES_PROXY_MAIN_H_
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | cc/trees/proxy_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698