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

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

Issue 963513004: Delete sky/scheduler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/scheduler/BUILD.gn ('k') | sky/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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKY_SCHEDULER_SCHEDULER_H_
6 #define SKY_SCHEDULER_SCHEDULER_H_
7
8 #include "base/single_thread_task_runner.h"
9 #include "base/time/time.h"
10 #include "sky/scheduler/timer.h"
11
12 namespace sky {
13
14 class Scheduler : public Timer::Client {
15 public:
16 class Client {
17 public:
18 virtual void BeginFrame(base::TimeTicks frame_time,
19 base::TimeTicks deadline) = 0;
20
21 protected:
22 virtual ~Client();
23 };
24
25 Scheduler(Client* client,
26 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
27 ~Scheduler();
28
29 void UpdateFrameDuration(base::TimeDelta estimate);
30 void UpdateVSync(const TimeInterval& vsync);
31
32 void SetNeedsFrame();
33
34 private:
35 void UpdateTimerInterval();
36 void OnTimerTick(base::TimeTicks now) override;
37
38 Client* client_;
39 Timer timer_;
40 TimeInterval vsync_;
41 base::TimeDelta frame_duration_;
42 };
43 }
44
45 #endif // SKY_SCHEDULER_SCHEDULER_H_
OLDNEW
« no previous file with comments | « sky/scheduler/BUILD.gn ('k') | sky/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698