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

Side by Side Diff: cc/scheduler/scheduler.h

Issue 1205483004: cc: Remove unnecessary task runner refptrs from schedulers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_begin_frame_source_constructor
Patch Set: fix surfaces_scheduler compile error Created 5 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 | « no previous file | cc/scheduler/scheduler.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_SCHEDULER_SCHEDULER_H_ 5 #ifndef CC_SCHEDULER_SCHEDULER_H_
6 #define CC_SCHEDULER_SCHEDULER_H_ 6 #define CC_SCHEDULER_SCHEDULER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 protected: 52 protected:
53 virtual ~SchedulerClient() {} 53 virtual ~SchedulerClient() {}
54 }; 54 };
55 55
56 class CC_EXPORT Scheduler : public BeginFrameObserverBase { 56 class CC_EXPORT Scheduler : public BeginFrameObserverBase {
57 public: 57 public:
58 static scoped_ptr<Scheduler> Create( 58 static scoped_ptr<Scheduler> Create(
59 SchedulerClient* client, 59 SchedulerClient* client,
60 const SchedulerSettings& scheduler_settings, 60 const SchedulerSettings& scheduler_settings,
61 int layer_tree_host_id, 61 int layer_tree_host_id,
62 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 62 base::SingleThreadTaskRunner* task_runner,
63 BeginFrameSource* external_frame_source); 63 BeginFrameSource* external_frame_source);
64 64
65 ~Scheduler() override; 65 ~Scheduler() override;
66 66
67 // BeginFrameObserverBase 67 // BeginFrameObserverBase
68 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override; 68 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override;
69 69
70 void OnDrawForOutputSurface(); 70 void OnDrawForOutputSurface();
71 71
72 const SchedulerSettings& settings() const { return settings_; } 72 const SchedulerSettings& settings() const { return settings_; }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 144 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
145 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); 145 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames);
146 146
147 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); 147 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval);
148 148
149 protected: 149 protected:
150 Scheduler(SchedulerClient* client, 150 Scheduler(SchedulerClient* client,
151 const SchedulerSettings& scheduler_settings, 151 const SchedulerSettings& scheduler_settings,
152 int layer_tree_host_id, 152 int layer_tree_host_id,
153 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 153 base::SingleThreadTaskRunner* task_runner,
154 BeginFrameSource* external_frame_source, 154 BeginFrameSource* external_frame_source,
155 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source, 155 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source,
156 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source); 156 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source);
157 157
158 // virtual for testing - Don't call these in the constructor or 158 // virtual for testing - Don't call these in the constructor or
159 // destructor! 159 // destructor!
160 virtual base::TimeTicks Now() const; 160 virtual base::TimeTicks Now() const;
161 161
162 const SchedulerSettings settings_; 162 const SchedulerSettings settings_;
163 SchedulerClient* client_; 163 SchedulerClient* client_;
164 int layer_tree_host_id_; 164 int layer_tree_host_id_;
165 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 165 base::SingleThreadTaskRunner* task_runner_;
166 BeginFrameSource* external_frame_source_; 166 BeginFrameSource* external_frame_source_;
167 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_; 167 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_;
168 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_; 168 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_;
169 169
170 scoped_ptr<BeginFrameSourceMultiplexer> frame_source_; 170 scoped_ptr<BeginFrameSourceMultiplexer> frame_source_;
171 bool throttle_frame_production_; 171 bool throttle_frame_production_;
172 172
173 base::TimeDelta authoritative_vsync_interval_; 173 base::TimeDelta authoritative_vsync_interval_;
174 base::TimeTicks last_vsync_timebase_; 174 base::TimeTicks last_vsync_timebase_;
175 175
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 base::WeakPtrFactory<Scheduler> weak_factory_; 226 base::WeakPtrFactory<Scheduler> weak_factory_;
227 227
228 DISALLOW_COPY_AND_ASSIGN(Scheduler); 228 DISALLOW_COPY_AND_ASSIGN(Scheduler);
229 }; 229 };
230 230
231 } // namespace cc 231 } // namespace cc
232 232
233 #endif // CC_SCHEDULER_SCHEDULER_H_ 233 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698