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

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

Issue 1520623003: cc:: Change plumbing for external_begin_frame_source to the Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing include. 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
« no previous file with comments | « cc/trees/proxy_main.cc ('k') | cc/trees/single_thread_proxy.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_SINGLE_THREAD_PROXY_H_ 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class BeginFrameSource; 22 class BeginFrameSource;
23 class ContextProvider; 23 class ContextProvider;
24 class LayerTreeHost; 24 class LayerTreeHost;
25 class LayerTreeHostSingleThreadClient; 25 class LayerTreeHostSingleThreadClient;
26 26
27 class CC_EXPORT SingleThreadProxy : public Proxy, 27 class CC_EXPORT SingleThreadProxy : public Proxy,
28 NON_EXPORTED_BASE(LayerTreeHostImplClient), 28 NON_EXPORTED_BASE(LayerTreeHostImplClient),
29 SchedulerClient { 29 SchedulerClient {
30 public: 30 public:
31 static scoped_ptr<Proxy> Create( 31 static scoped_ptr<Proxy> Create(LayerTreeHost* layer_tree_host,
32 LayerTreeHost* layer_tree_host, 32 LayerTreeHostSingleThreadClient* client,
33 LayerTreeHostSingleThreadClient* client, 33 TaskRunnerProvider* task_runner_provider_);
34 TaskRunnerProvider* task_runner_provider_,
35 scoped_ptr<BeginFrameSource> external_begin_frame_source);
36 ~SingleThreadProxy() override; 34 ~SingleThreadProxy() override;
37 35
38 // Proxy implementation 36 // Proxy implementation
39 void FinishAllRendering() override; 37 void FinishAllRendering() override;
40 bool IsStarted() const override; 38 bool IsStarted() const override;
41 bool CommitToActiveTree() const override; 39 bool CommitToActiveTree() const override;
42 void SetOutputSurface(OutputSurface* output_surface) override; 40 void SetOutputSurface(OutputSurface* output_surface) override;
43 void ReleaseOutputSurface() override; 41 void ReleaseOutputSurface() override;
44 void SetVisible(bool visible) override; 42 void SetVisible(bool visible) override;
45 void SetThrottleFrameProduction(bool throttle) override; 43 void SetThrottleFrameProduction(bool throttle) override;
46 const RendererCapabilities& GetRendererCapabilities() const override; 44 const RendererCapabilities& GetRendererCapabilities() const override;
47 void SetNeedsAnimate() override; 45 void SetNeedsAnimate() override;
48 void SetNeedsUpdateLayers() override; 46 void SetNeedsUpdateLayers() override;
49 void SetNeedsCommit() override; 47 void SetNeedsCommit() override;
50 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; 48 void SetNeedsRedraw(const gfx::Rect& damage_rect) override;
51 void SetNextCommitWaitsForActivation() override; 49 void SetNextCommitWaitsForActivation() override;
52 void NotifyInputThrottledUntilCommit() override {} 50 void NotifyInputThrottledUntilCommit() override {}
53 void SetDeferCommits(bool defer_commits) override; 51 void SetDeferCommits(bool defer_commits) override;
54 bool CommitRequested() const override; 52 bool CommitRequested() const override;
55 bool BeginMainFrameRequested() const override; 53 bool BeginMainFrameRequested() const override;
56 void MainThreadHasStoppedFlinging() override {} 54 void MainThreadHasStoppedFlinging() override {}
57 void Start() override; 55 void Start(scoped_ptr<BeginFrameSource> external_begin_frame_source) override;
58 void Stop() override; 56 void Stop() override;
59 bool SupportsImplScrolling() const override; 57 bool SupportsImplScrolling() const override;
60 bool MainFrameWillHappenForTesting() override; 58 bool MainFrameWillHappenForTesting() override;
61 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; 59 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override;
62 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; 60 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override;
63 void UpdateTopControlsState(TopControlsState constraints, 61 void UpdateTopControlsState(TopControlsState constraints,
64 TopControlsState current, 62 TopControlsState current,
65 bool animate) override; 63 bool animate) override;
66 64
67 // SchedulerClient implementation 65 // SchedulerClient implementation
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 override; 111 override;
114 112
115 void RequestNewOutputSurface(); 113 void RequestNewOutputSurface();
116 114
117 // Called by the legacy path where RenderWidget does the scheduling. 115 // Called by the legacy path where RenderWidget does the scheduling.
118 void CompositeImmediately(base::TimeTicks frame_begin_time); 116 void CompositeImmediately(base::TimeTicks frame_begin_time);
119 117
120 protected: 118 protected:
121 SingleThreadProxy(LayerTreeHost* layer_tree_host, 119 SingleThreadProxy(LayerTreeHost* layer_tree_host,
122 LayerTreeHostSingleThreadClient* client, 120 LayerTreeHostSingleThreadClient* client,
123 TaskRunnerProvider* task_runner_provider, 121 TaskRunnerProvider* task_runner_provider);
124 scoped_ptr<BeginFrameSource> external_begin_frame_source);
125 122
126 private: 123 private:
127 void BeginMainFrame(const BeginFrameArgs& begin_frame_args); 124 void BeginMainFrame(const BeginFrameArgs& begin_frame_args);
128 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); 125 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason);
129 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args); 126 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args);
130 void DoCommit(); 127 void DoCommit();
131 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame); 128 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame);
132 void DoSwap(); 129 void DoSwap();
133 void DidCommitAndDrawFrame(); 130 void DidCommitAndDrawFrame();
134 void CommitComplete(); 131 void CommitComplete();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 private: 233 private:
237 DebugScopedSetImplThread impl_thread_; 234 DebugScopedSetImplThread impl_thread_;
238 DebugScopedSetMainThreadBlocked main_thread_blocked_; 235 DebugScopedSetMainThreadBlocked main_thread_blocked_;
239 236
240 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 237 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
241 }; 238 };
242 239
243 } // namespace cc 240 } // namespace cc
244 241
245 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 242 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/proxy_main.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698