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

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

Issue 307773005: Adding AsValue and TypeString methods to DelayBasedTimeSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing onto master. 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 | « cc/scheduler/delay_based_time_source.cc ('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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "cc/base/cc_export.h" 15 #include "cc/base/cc_export.h"
16 #include "cc/output/begin_frame_args.h" 16 #include "cc/output/begin_frame_args.h"
17 #include "cc/scheduler/delay_based_time_source.h"
17 #include "cc/scheduler/draw_result.h" 18 #include "cc/scheduler/draw_result.h"
18 #include "cc/scheduler/scheduler_settings.h" 19 #include "cc/scheduler/scheduler_settings.h"
19 #include "cc/scheduler/scheduler_state_machine.h" 20 #include "cc/scheduler/scheduler_state_machine.h"
20 #include "cc/scheduler/time_source.h"
brianderson 2014/06/10 18:16:51 Can we just delete time_source.h? Seems like an un
21 21
22 namespace base { 22 namespace base {
23 class SingleThreadTaskRunner; 23 class SingleThreadTaskRunner;
24 } 24 }
25 25
26 namespace cc { 26 namespace cc {
27 27
28 class SchedulerClient { 28 class SchedulerClient {
29 public: 29 public:
30 virtual void SetNeedsBeginFrame(bool enable) = 0; 30 virtual void SetNeedsBeginFrame(bool enable) = 0;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Activates future BeginFrames and, if activating, pushes the most 157 // Activates future BeginFrames and, if activating, pushes the most
158 // recently missed BeginFrame to the back of a retroactive queue. 158 // recently missed BeginFrame to the back of a retroactive queue.
159 void SetNeedsBeginFrame(bool needs_begin_frame, 159 void SetNeedsBeginFrame(bool needs_begin_frame,
160 std::deque<BeginFrameArgs>* begin_retro_frame_args); 160 std::deque<BeginFrameArgs>* begin_retro_frame_args);
161 161
162 bool IsActive() const; 162 bool IsActive() const;
163 163
164 // TimeSourceClient implementation of OnTimerTick triggers a BeginFrame. 164 // TimeSourceClient implementation of OnTimerTick triggers a BeginFrame.
165 virtual void OnTimerTick() OVERRIDE; 165 virtual void OnTimerTick() OVERRIDE;
166 166
167 scoped_ptr<base::Value> AsValue() const;
168
167 private: 169 private:
168 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time); 170 BeginFrameArgs CreateSyntheticBeginFrameArgs(base::TimeTicks frame_time);
169 171
170 Scheduler* scheduler_; 172 Scheduler* scheduler_;
171 scoped_refptr<TimeSource> time_source_; 173 scoped_refptr<DelayBasedTimeSource> time_source_;
172 }; 174 };
173 175
174 Scheduler( 176 Scheduler(
175 SchedulerClient* client, 177 SchedulerClient* client,
176 const SchedulerSettings& scheduler_settings, 178 const SchedulerSettings& scheduler_settings,
177 int layer_tree_host_id, 179 int layer_tree_host_id,
178 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner); 180 const scoped_refptr<base::SingleThreadTaskRunner>& impl_task_runner);
179 181
180 const SchedulerSettings settings_; 182 const SchedulerSettings settings_;
181 SchedulerClient* client_; 183 SchedulerClient* client_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 void SetupSyntheticBeginFrames(); 227 void SetupSyntheticBeginFrames();
226 228
227 base::WeakPtrFactory<Scheduler> weak_factory_; 229 base::WeakPtrFactory<Scheduler> weak_factory_;
228 230
229 DISALLOW_COPY_AND_ASSIGN(Scheduler); 231 DISALLOW_COPY_AND_ASSIGN(Scheduler);
230 }; 232 };
231 233
232 } // namespace cc 234 } // namespace cc
233 235
234 #endif // CC_SCHEDULER_SCHEDULER_H_ 236 #endif // CC_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/scheduler/delay_based_time_source.cc ('k') | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698