OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ | 5 #ifndef MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ |
6 #define MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ | 6 #define MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/scheduler/scheduler.h" | 10 #include "cc/scheduler/scheduler.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 class Display; | 13 class Display; |
14 } | 14 } |
15 | 15 |
16 namespace surfaces { | 16 namespace surfaces { |
17 | 17 |
18 class SurfacesScheduler : public cc::SchedulerClient { | 18 class SurfacesScheduler : public cc::SchedulerClient { |
19 public: | 19 public: |
20 SurfacesScheduler(); | 20 SurfacesScheduler(); |
21 ~SurfacesScheduler(); | 21 ~SurfacesScheduler() override; |
22 | 22 |
23 void SetNeedsDraw(); | 23 void SetNeedsDraw(); |
24 | 24 |
25 void OnVSyncParametersUpdated(base::TimeTicks timebase, | 25 void OnVSyncParametersUpdated(base::TimeTicks timebase, |
26 base::TimeDelta interval); | 26 base::TimeDelta interval); |
27 | 27 |
28 void AddDisplay(cc::Display* display); | 28 void AddDisplay(cc::Display* display); |
29 void RemoveDisplay(cc::Display* display); | 29 void RemoveDisplay(cc::Display* display); |
30 | 30 |
31 private: | 31 private: |
(...skipping 17 matching lines...) Expand all Loading... |
49 std::set<cc::Display*> displays_; | 49 std::set<cc::Display*> displays_; |
50 scoped_ptr<cc::Scheduler> scheduler_; | 50 scoped_ptr<cc::Scheduler> scheduler_; |
51 base::TimeDelta draw_estimate_; | 51 base::TimeDelta draw_estimate_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(SurfacesScheduler); | 53 DISALLOW_COPY_AND_ASSIGN(SurfacesScheduler); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace mojo | 56 } // namespace mojo |
57 | 57 |
58 #endif // MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ | 58 #endif // MOJO_SERVICES_SURFACES_SURFACES_SCHEDULER_H_ |
OLD | NEW |