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

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

Issue 1005553004: cc: Add support for handling authoritative vsync interval (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 160 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
161 void AsValueInto(base::trace_event::TracedValue* value) const override; 161 void AsValueInto(base::trace_event::TracedValue* value) const override;
162 162
163 void SetContinuousPainting(bool continuous_painting) { 163 void SetContinuousPainting(bool continuous_painting) {
164 state_machine_.SetContinuousPainting(continuous_painting); 164 state_machine_.SetContinuousPainting(continuous_painting);
165 } 165 }
166 166
167 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 167 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
168 168
169 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval);
170
169 protected: 171 protected:
170 Scheduler(SchedulerClient* client, 172 Scheduler(SchedulerClient* client,
171 const SchedulerSettings& scheduler_settings, 173 const SchedulerSettings& scheduler_settings,
172 int layer_tree_host_id, 174 int layer_tree_host_id,
173 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 175 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
174 scoped_ptr<BeginFrameSource> external_begin_frame_source, 176 scoped_ptr<BeginFrameSource> external_begin_frame_source,
175 SchedulerFrameSourcesConstructor* frame_sources_constructor); 177 SchedulerFrameSourcesConstructor* frame_sources_constructor);
176 178
177 // virtual for testing - Don't call these in the constructor or 179 // virtual for testing - Don't call these in the constructor or
178 // destructor! 180 // destructor!
179 virtual base::TimeTicks Now() const; 181 virtual base::TimeTicks Now() const;
180 182
181 scoped_ptr<BeginFrameSourceMultiplexer> frame_source_; 183 scoped_ptr<BeginFrameSourceMultiplexer> frame_source_;
182 BeginFrameSource* primary_frame_source_; 184 BeginFrameSource* primary_frame_source_;
183 BeginFrameSource* background_frame_source_; 185 BeginFrameSource* background_frame_source_;
184 BeginFrameSource* unthrottled_frame_source_; 186 BeginFrameSource* unthrottled_frame_source_;
185 187
186 // Storage when frame sources are internal 188 // Storage when frame sources are internal
187 scoped_ptr<BeginFrameSource> primary_frame_source_internal_; 189 scoped_ptr<BeginFrameSource> primary_frame_source_internal_;
188 scoped_ptr<SyntheticBeginFrameSource> background_frame_source_internal_; 190 scoped_ptr<SyntheticBeginFrameSource> background_frame_source_internal_;
189 scoped_ptr<BeginFrameSource> unthrottled_frame_source_internal_; 191 scoped_ptr<BeginFrameSource> unthrottled_frame_source_internal_;
190 192
191 VSyncParameterObserver* vsync_observer_; 193 VSyncParameterObserver* vsync_observer_;
194 base::TimeDelta authoritative_vsync_interval_;
195 base::TimeTicks last_vsync_timebase_;
196
192 bool throttle_frame_production_; 197 bool throttle_frame_production_;
193 198
194 const SchedulerSettings settings_; 199 const SchedulerSettings settings_;
195 SchedulerClient* client_; 200 SchedulerClient* client_;
196 int layer_tree_host_id_; 201 int layer_tree_host_id_;
197 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 202 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
198 203
199 base::TimeDelta estimated_parent_draw_time_; 204 base::TimeDelta estimated_parent_draw_time_;
200 205
201 std::deque<BeginFrameArgs> begin_retro_frame_args_; 206 std::deque<BeginFrameArgs> begin_retro_frame_args_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 251
247 friend class SchedulerFrameSourcesConstructor; 252 friend class SchedulerFrameSourcesConstructor;
248 friend class TestSchedulerFrameSourcesConstructor; 253 friend class TestSchedulerFrameSourcesConstructor;
249 254
250 DISALLOW_COPY_AND_ASSIGN(Scheduler); 255 DISALLOW_COPY_AND_ASSIGN(Scheduler);
251 }; 256 };
252 257
253 } // namespace cc 258 } // namespace cc
254 259
255 #endif // CC_SCHEDULER_SCHEDULER_H_ 260 #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