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

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

Issue 1012853003: Add DisplayScheduler for Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include dependent patch for trybots Created 5 years, 8 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 ~Scheduler() override; 93 ~Scheduler() override;
94 94
95 // BeginFrameObserverMixin 95 // BeginFrameObserverMixin
96 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override; 96 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override;
97 97
98 void OnDrawForOutputSurface(); 98 void OnDrawForOutputSurface();
99 99
100 const SchedulerSettings& settings() const { return settings_; } 100 const SchedulerSettings& settings() const { return settings_; }
101 101
102 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval);
102 void CommitVSyncParameters(base::TimeTicks timebase, 103 void CommitVSyncParameters(base::TimeTicks timebase,
103 base::TimeDelta interval); 104 base::TimeDelta interval);
104 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); 105 void SetEstimatedParentDrawTime(base::TimeDelta draw_time);
105 106
106 void SetCanStart(); 107 void SetCanStart();
107 108
108 void SetVisible(bool visible); 109 void SetVisible(bool visible);
109 void SetCanDraw(bool can_draw); 110 void SetCanDraw(bool can_draw);
110 void NotifyReadyToActivate(); 111 void NotifyReadyToActivate();
111 void NotifyReadyToDraw(); 112 void NotifyReadyToDraw();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 164
164 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 165 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
165 void AsValueInto(base::trace_event::TracedValue* value) const override; 166 void AsValueInto(base::trace_event::TracedValue* value) const override;
166 167
167 void SetContinuousPainting(bool continuous_painting) { 168 void SetContinuousPainting(bool continuous_painting) {
168 state_machine_.SetContinuousPainting(continuous_painting); 169 state_machine_.SetContinuousPainting(continuous_painting);
169 } 170 }
170 171
171 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 172 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
172 173
173 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval);
174
175 protected: 174 protected:
176 Scheduler(SchedulerClient* client, 175 Scheduler(SchedulerClient* client,
177 const SchedulerSettings& scheduler_settings, 176 const SchedulerSettings& scheduler_settings,
178 int layer_tree_host_id, 177 int layer_tree_host_id,
179 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 178 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
180 scoped_ptr<BeginFrameSource> external_begin_frame_source, 179 scoped_ptr<BeginFrameSource> external_begin_frame_source,
181 SchedulerFrameSourcesConstructor* frame_sources_constructor); 180 SchedulerFrameSourcesConstructor* frame_sources_constructor);
182 181
183 // virtual for testing - Don't call these in the constructor or 182 // virtual for testing - Don't call these in the constructor or
184 // destructor! 183 // destructor!
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 251
253 friend class SchedulerFrameSourcesConstructor; 252 friend class SchedulerFrameSourcesConstructor;
254 friend class TestSchedulerFrameSourcesConstructor; 253 friend class TestSchedulerFrameSourcesConstructor;
255 254
256 DISALLOW_COPY_AND_ASSIGN(Scheduler); 255 DISALLOW_COPY_AND_ASSIGN(Scheduler);
257 }; 256 };
258 257
259 } // namespace cc 258 } // namespace cc
260 259
261 #endif // CC_SCHEDULER_SCHEDULER_H_ 260 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/scheduler/scheduler.cc » ('j') | cc/surfaces/display.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698