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

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

Issue 1774323003: Allow cc::Scheduler begin frame source to be changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_always_external
Patch Set: Add early out Created 4 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 const SchedulerSettings& settings() const { return settings_; } 74 const SchedulerSettings& settings() const { return settings_; }
75 75
76 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); 76 void SetEstimatedParentDrawTime(base::TimeDelta draw_time);
77 77
78 void SetVisible(bool visible); 78 void SetVisible(bool visible);
79 bool visible() { return state_machine_.visible(); } 79 bool visible() { return state_machine_.visible(); }
80 void SetCanDraw(bool can_draw); 80 void SetCanDraw(bool can_draw);
81 void NotifyReadyToActivate(); 81 void NotifyReadyToActivate();
82 void NotifyReadyToDraw(); 82 void NotifyReadyToDraw();
83 void SetBeginFrameSource(BeginFrameSource* source);
83 84
84 void SetNeedsBeginMainFrame(); 85 void SetNeedsBeginMainFrame();
85 // Requests a single impl frame (after the current frame if there is one 86 // Requests a single impl frame (after the current frame if there is one
86 // active). 87 // active).
87 void SetNeedsOneBeginImplFrame(); 88 void SetNeedsOneBeginImplFrame();
88 89
89 void SetNeedsRedraw(); 90 void SetNeedsRedraw();
90 91
91 void SetNeedsPrepareTiles(); 92 void SetNeedsPrepareTiles();
92 93
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::TimeTicks LastBeginImplFrameTime(); 134 base::TimeTicks LastBeginImplFrameTime();
134 135
135 void SetDeferCommits(bool defer_commits); 136 void SetDeferCommits(bool defer_commits);
136 137
137 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 138 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
138 void AsValueInto(base::trace_event::TracedValue* value) const override; 139 void AsValueInto(base::trace_event::TracedValue* value) const override;
139 140
140 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); 141 void SetChildrenNeedBeginFrames(bool children_need_begin_frames);
141 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames); 142 void SetVideoNeedsBeginFrames(bool video_needs_begin_frames);
142 143
144 const BeginFrameSource* begin_frame_source() const {
145 return begin_frame_source_;
146 }
147
143 protected: 148 protected:
144 Scheduler(SchedulerClient* client, 149 Scheduler(SchedulerClient* client,
145 const SchedulerSettings& scheduler_settings, 150 const SchedulerSettings& scheduler_settings,
146 int layer_tree_host_id, 151 int layer_tree_host_id,
147 base::SingleThreadTaskRunner* task_runner, 152 base::SingleThreadTaskRunner* task_runner,
148 BeginFrameSource* begin_frame_source, 153 BeginFrameSource* begin_frame_source,
149 scoped_ptr<CompositorTimingHistory> compositor_timing_history); 154 scoped_ptr<CompositorTimingHistory> compositor_timing_history);
150 155
151 // Virtual for testing. 156 // Virtual for testing.
152 virtual base::TimeTicks Now() const; 157 virtual base::TimeTicks Now() const;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 220 }
216 221
217 base::WeakPtrFactory<Scheduler> weak_factory_; 222 base::WeakPtrFactory<Scheduler> weak_factory_;
218 223
219 DISALLOW_COPY_AND_ASSIGN(Scheduler); 224 DISALLOW_COPY_AND_ASSIGN(Scheduler);
220 }; 225 };
221 226
222 } // namespace cc 227 } // namespace cc
223 228
224 #endif // CC_SCHEDULER_SCHEDULER_H_ 229 #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