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

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: Add scoped_abort_remaining_swap_promises.h Created 6 years, 4 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 | « cc/cc.gyp ('k') | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 protected: 50 protected:
51 virtual ~SchedulerClient() {} 51 virtual ~SchedulerClient() {}
52 }; 52 };
53 53
54 class CC_EXPORT Scheduler { 54 class CC_EXPORT Scheduler {
55 public: 55 public:
56 static scoped_ptr<Scheduler> Create( 56 static scoped_ptr<Scheduler> Create(
57 SchedulerClient* client, 57 SchedulerClient* client,
58 const SchedulerSettings& scheduler_settings, 58 const SchedulerSettings& scheduler_settings,
59 int layer_tree_host_id, 59 int layer_tree_host_id,
60 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner) { 60 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
61 return make_scoped_ptr(new Scheduler( 61 return make_scoped_ptr(new Scheduler(
62 client, scheduler_settings, layer_tree_host_id, impl_task_runner)); 62 client, scheduler_settings, layer_tree_host_id, task_runner));
63 } 63 }
64 64
65 virtual ~Scheduler(); 65 virtual ~Scheduler();
66 66
67 const SchedulerSettings& settings() const { return settings_; } 67 const SchedulerSettings& settings() const { return settings_; }
68 68
69 void CommitVSyncParameters(base::TimeTicks timebase, 69 void CommitVSyncParameters(base::TimeTicks timebase,
70 base::TimeDelta interval); 70 base::TimeDelta interval);
71 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); 71 void SetEstimatedParentDrawTime(base::TimeDelta draw_time);
72 72
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void AsValueInto(base::debug::TracedValue* dict) const; 174 void AsValueInto(base::debug::TracedValue* dict) const;
175 175
176 private: 176 private:
177 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time); 177 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time);
178 178
179 Scheduler* scheduler_; 179 Scheduler* scheduler_;
180 scoped_refptr<DelayBasedTimeSource> time_source_; 180 scoped_refptr<DelayBasedTimeSource> time_source_;
181 }; 181 };
182 182
183 Scheduler( 183 Scheduler(SchedulerClient* client,
184 SchedulerClient* client, 184 const SchedulerSettings& scheduler_settings,
185 const SchedulerSettings& scheduler_settings, 185 int layer_tree_host_id,
186 int layer_tree_host_id, 186 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
187 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner);
188 187
189 const SchedulerSettings settings_; 188 const SchedulerSettings settings_;
190 SchedulerClient* client_; 189 SchedulerClient* client_;
191 int layer_tree_host_id_; 190 int layer_tree_host_id_;
192 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 191 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
193 192
194 base::TimeDelta vsync_interval_; 193 base::TimeDelta vsync_interval_;
195 base::TimeDelta estimated_parent_draw_time_; 194 base::TimeDelta estimated_parent_draw_time_;
196 195
197 bool last_set_needs_begin_frame_; 196 bool last_set_needs_begin_frame_;
198 bool begin_unthrottled_frame_posted_; 197 bool begin_unthrottled_frame_posted_;
199 bool begin_retro_frame_posted_; 198 bool begin_retro_frame_posted_;
200 std::deque<BeginFrameArgs> begin_retro_frame_args_; 199 std::deque<BeginFrameArgs> begin_retro_frame_args_;
201 BeginFrameArgs begin_impl_frame_args_; 200 BeginFrameArgs begin_impl_frame_args_;
202 201
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void SetupSyntheticBeginFrames(); 233 void SetupSyntheticBeginFrames();
235 234
236 base::WeakPtrFactory<Scheduler> weak_factory_; 235 base::WeakPtrFactory<Scheduler> weak_factory_;
237 236
238 DISALLOW_COPY_AND_ASSIGN(Scheduler); 237 DISALLOW_COPY_AND_ASSIGN(Scheduler);
239 }; 238 };
240 239
241 } // namespace cc 240 } // namespace cc
242 241
243 #endif // CC_SCHEDULER_SCHEDULER_H_ 242 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698