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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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/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/output/renderer_capabilities.h" 12 #include "cc/output/renderer_capabilities.h"
13 #include "cc/trees/channel_main.h" 13 #include "cc/trees/channel_main.h"
14 #include "cc/trees/proxy.h" 14 #include "cc/trees/proxy.h"
15 #include "cc/trees/proxy_common.h" 15 #include "cc/trees/proxy_common.h"
16 #include "cc/trees/remote_proto_channel.h" 16 #include "cc/trees/remote_proto_channel.h"
17 17
18 namespace cc { 18 namespace cc {
19 19
20 class AnimationEvents; 20 class AnimationEvents;
21 class BeginFrameSource; 21 class BeginFrameSource;
22 class ChannelMain; 22 class ChannelMain;
23 class LayerTreeHost; 23 class LayerTreeHost;
24 class LayerTreeMutator;
24 25
25 // This class aggregates all interactions that the impl side of the compositor 26 // This class aggregates all interactions that the impl side of the compositor
26 // needs to have with the main side. 27 // needs to have with the main side.
27 // The class is created and lives on the main thread. 28 // The class is created and lives on the main thread.
28 class CC_EXPORT ProxyMain : public Proxy { 29 class CC_EXPORT ProxyMain : public Proxy {
29 public: 30 public:
30 static std::unique_ptr<ProxyMain> CreateThreaded( 31 static std::unique_ptr<ProxyMain> CreateThreaded(
31 LayerTreeHost* layer_tree_host, 32 LayerTreeHost* layer_tree_host,
32 TaskRunnerProvider* task_runner_provider); 33 TaskRunnerProvider* task_runner_provider);
33 34
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void SetNextCommitWaitsForActivation() override; 97 void SetNextCommitWaitsForActivation() override;
97 void NotifyInputThrottledUntilCommit() override; 98 void NotifyInputThrottledUntilCommit() override;
98 void SetDeferCommits(bool defer_commits) override; 99 void SetDeferCommits(bool defer_commits) override;
99 bool CommitRequested() const override; 100 bool CommitRequested() const override;
100 bool BeginMainFrameRequested() const override; 101 bool BeginMainFrameRequested() const override;
101 void MainThreadHasStoppedFlinging() override; 102 void MainThreadHasStoppedFlinging() override;
102 void Start( 103 void Start(
103 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override; 104 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
104 void Stop() override; 105 void Stop() override;
105 bool SupportsImplScrolling() const override; 106 bool SupportsImplScrolling() const override;
107 void SetMutator(std::unique_ptr<LayerTreeMutator> mutator) override;
106 bool MainFrameWillHappenForTesting() override; 108 bool MainFrameWillHappenForTesting() override;
107 void ReleaseOutputSurface() override; 109 void ReleaseOutputSurface() override;
108 void UpdateTopControlsState(TopControlsState constraints, 110 void UpdateTopControlsState(TopControlsState constraints,
109 TopControlsState current, 111 TopControlsState current,
110 bool animate) override; 112 bool animate) override;
111 113
112 // This sets the channel used by ProxyMain to communicate with ProxyImpl. 114 // This sets the channel used by ProxyMain to communicate with ProxyImpl.
113 void SetChannel(std::unique_ptr<ChannelMain> channel_main); 115 void SetChannel(std::unique_ptr<ChannelMain> channel_main);
114 116
115 // Returns |true| if the request was actually sent, |false| if one was 117 // Returns |true| if the request was actually sent, |false| if one was
(...skipping 29 matching lines...) Expand all
145 RendererCapabilities renderer_capabilities_; 147 RendererCapabilities renderer_capabilities_;
146 148
147 std::unique_ptr<ChannelMain> channel_main_; 149 std::unique_ptr<ChannelMain> channel_main_;
148 150
149 DISALLOW_COPY_AND_ASSIGN(ProxyMain); 151 DISALLOW_COPY_AND_ASSIGN(ProxyMain);
150 }; 152 };
151 153
152 } // namespace cc 154 } // namespace cc
153 155
154 #endif // CC_TREES_PROXY_MAIN_H_ 156 #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