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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review cleanup Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | cc/test/layer_tree_test.cc » ('J')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 protected: 47 protected:
48 virtual ~SchedulerClient() {} 48 virtual ~SchedulerClient() {}
49 }; 49 };
50 50
51 class CC_EXPORT Scheduler { 51 class CC_EXPORT Scheduler {
52 public: 52 public:
53 static scoped_ptr<Scheduler> Create( 53 static scoped_ptr<Scheduler> Create(
54 SchedulerClient* client, 54 SchedulerClient* client,
55 const SchedulerSettings& scheduler_settings, 55 const SchedulerSettings& scheduler_settings,
56 int layer_tree_host_id, 56 int layer_tree_host_id,
57 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner) { 57 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
58 return make_scoped_ptr(new Scheduler( 58 return make_scoped_ptr(new Scheduler(
59 client, scheduler_settings, layer_tree_host_id, impl_task_runner)); 59 client, scheduler_settings, layer_tree_host_id, task_runner));
60 } 60 }
61 61
62 virtual ~Scheduler(); 62 virtual ~Scheduler();
63 63
64 const SchedulerSettings& settings() const { return settings_; } 64 const SchedulerSettings& settings() const { return settings_; }
65 65
66 void CommitVSyncParameters(base::TimeTicks timebase, 66 void CommitVSyncParameters(base::TimeTicks timebase,
67 base::TimeDelta interval); 67 base::TimeDelta interval);
68 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); 68 void SetEstimatedParentDrawTime(base::TimeDelta draw_time);
69 69
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 scoped_ptr<base::Value> AsValue() const; 167 scoped_ptr<base::Value> AsValue() const;
168 168
169 private: 169 private:
170 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time); 170 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time);
171 171
172 Scheduler* scheduler_; 172 Scheduler* scheduler_;
173 scoped_refptr<DelayBasedTimeSource> time_source_; 173 scoped_refptr<DelayBasedTimeSource> time_source_;
174 }; 174 };
175 175
176 Scheduler( 176 Scheduler(SchedulerClient* client,
177 SchedulerClient* client, 177 const SchedulerSettings& scheduler_settings,
178 const SchedulerSettings& scheduler_settings, 178 int layer_tree_host_id,
179 int layer_tree_host_id, 179 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
180 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner);
181 180
182 const SchedulerSettings settings_; 181 const SchedulerSettings settings_;
183 SchedulerClient* client_; 182 SchedulerClient* client_;
184 int layer_tree_host_id_; 183 int layer_tree_host_id_;
185 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 184 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
186 185
187 base::TimeDelta vsync_interval_; 186 base::TimeDelta vsync_interval_;
188 base::TimeDelta estimated_parent_draw_time_; 187 base::TimeDelta estimated_parent_draw_time_;
189 188
190 bool last_set_needs_begin_frame_; 189 bool last_set_needs_begin_frame_;
191 bool begin_unthrottled_frame_posted_; 190 bool begin_unthrottled_frame_posted_;
192 bool begin_retro_frame_posted_; 191 bool begin_retro_frame_posted_;
193 std::deque<BeginFrameArgs> begin_retro_frame_args_; 192 std::deque<BeginFrameArgs> begin_retro_frame_args_;
194 BeginFrameArgs begin_impl_frame_args_; 193 BeginFrameArgs begin_impl_frame_args_;
195 194
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void SetupSyntheticBeginFrames(); 226 void SetupSyntheticBeginFrames();
228 227
229 base::WeakPtrFactory<Scheduler> weak_factory_; 228 base::WeakPtrFactory<Scheduler> weak_factory_;
230 229
231 DISALLOW_COPY_AND_ASSIGN(Scheduler); 230 DISALLOW_COPY_AND_ASSIGN(Scheduler);
232 }; 231 };
233 232
234 } // namespace cc 233 } // namespace cc
235 234
236 #endif // CC_SCHEDULER_SCHEDULER_H_ 235 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | cc/test/layer_tree_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698