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

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: Suppress SetLayerTreeHostClientReady in tests Created 6 years, 5 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
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 scoped_ptr<base::Value> AsValue() const; 164 scoped_ptr<base::Value> AsValue() const;
165 165
166 private: 166 private:
167 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time); 167 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time);
168 168
169 Scheduler* scheduler_; 169 Scheduler* scheduler_;
170 scoped_refptr<DelayBasedTimeSource> time_source_; 170 scoped_refptr<DelayBasedTimeSource> time_source_;
171 }; 171 };
172 172
173 Scheduler( 173 Scheduler(SchedulerClient* client,
174 SchedulerClient* client, 174 const SchedulerSettings& scheduler_settings,
175 const SchedulerSettings& scheduler_settings, 175 int layer_tree_host_id,
176 int layer_tree_host_id, 176 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
177 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner);
178 177
179 const SchedulerSettings settings_; 178 const SchedulerSettings settings_;
180 SchedulerClient* client_; 179 SchedulerClient* client_;
181 int layer_tree_host_id_; 180 int layer_tree_host_id_;
182 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 181 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
183 182
184 base::TimeDelta vsync_interval_; 183 base::TimeDelta vsync_interval_;
185 base::TimeDelta estimated_parent_draw_time_; 184 base::TimeDelta estimated_parent_draw_time_;
186 185
187 bool last_set_needs_begin_frame_; 186 bool last_set_needs_begin_frame_;
188 bool begin_unthrottled_frame_posted_; 187 bool begin_unthrottled_frame_posted_;
189 bool begin_retro_frame_posted_; 188 bool begin_retro_frame_posted_;
190 std::deque<BeginFrameArgs> begin_retro_frame_args_; 189 std::deque<BeginFrameArgs> begin_retro_frame_args_;
191 BeginFrameArgs begin_impl_frame_args_; 190 BeginFrameArgs begin_impl_frame_args_;
192 191
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void SetupSyntheticBeginFrames(); 223 void SetupSyntheticBeginFrames();
225 224
226 base::WeakPtrFactory<Scheduler> weak_factory_; 225 base::WeakPtrFactory<Scheduler> weak_factory_;
227 226
228 DISALLOW_COPY_AND_ASSIGN(Scheduler); 227 DISALLOW_COPY_AND_ASSIGN(Scheduler);
229 }; 228 };
230 229
231 } // namespace cc 230 } // namespace cc
232 231
233 #endif // CC_SCHEDULER_SCHEDULER_H_ 232 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698