OLD | NEW |
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/power_monitor/power_monitor.h" | 14 #include "base/power_monitor/power_monitor.h" |
15 #include "base/power_monitor/power_observer.h" | 15 #include "base/power_monitor/power_observer.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
18 #include "cc/output/begin_frame_args.h" | 18 #include "cc/output/begin_frame_args.h" |
19 #include "cc/output/vsync_parameter_observer.h" | 19 #include "cc/output/vsync_parameter_observer.h" |
20 #include "cc/scheduler/begin_frame_source.h" | 20 #include "cc/scheduler/begin_frame_source.h" |
21 #include "cc/scheduler/delay_based_time_source.h" | 21 #include "cc/scheduler/delay_based_time_source.h" |
22 #include "cc/scheduler/draw_result.h" | 22 #include "cc/scheduler/draw_result.h" |
23 #include "cc/scheduler/scheduler_settings.h" | 23 #include "cc/scheduler/scheduler_settings.h" |
24 #include "cc/scheduler/scheduler_state_machine.h" | 24 #include "cc/scheduler/scheduler_state_machine.h" |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 namespace debug { | 27 namespace trace_event { |
28 class ConvertableToTraceFormat; | 28 class ConvertableToTraceFormat; |
29 } | 29 } |
| 30 |
| 31 // TODO(ssid): remove these aliases after the tracing clients are moved to the |
| 32 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 |
| 33 namespace debug { |
| 34 using ::base::trace_event::ConvertableToTraceFormat; |
| 35 } |
30 class SingleThreadTaskRunner; | 36 class SingleThreadTaskRunner; |
31 } | 37 } // namespace base |
32 | 38 |
33 namespace cc { | 39 namespace cc { |
34 | 40 |
35 class SchedulerClient { | 41 class SchedulerClient { |
36 public: | 42 public: |
37 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0; | 43 virtual void WillBeginImplFrame(const BeginFrameArgs& args) = 0; |
38 virtual void ScheduledActionSendBeginMainFrame() = 0; | 44 virtual void ScheduledActionSendBeginMainFrame() = 0; |
39 virtual DrawResult ScheduledActionDrawAndSwapIfPossible() = 0; | 45 virtual DrawResult ScheduledActionDrawAndSwapIfPossible() = 0; |
40 virtual DrawResult ScheduledActionDrawAndSwapForced() = 0; | 46 virtual DrawResult ScheduledActionDrawAndSwapForced() = 0; |
41 virtual void ScheduledActionAnimate() = 0; | 47 virtual void ScheduledActionAnimate() = 0; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 264 |
259 friend class SchedulerFrameSourcesConstructor; | 265 friend class SchedulerFrameSourcesConstructor; |
260 friend class TestSchedulerFrameSourcesConstructor; | 266 friend class TestSchedulerFrameSourcesConstructor; |
261 | 267 |
262 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 268 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
263 }; | 269 }; |
264 | 270 |
265 } // namespace cc | 271 } // namespace cc |
266 | 272 |
267 #endif // CC_SCHEDULER_SCHEDULER_H_ | 273 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |