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_STATE_MACHINE_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 6 #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
13 #include "cc/output/begin_frame_args.h" | 13 #include "cc/output/begin_frame_args.h" |
14 #include "cc/scheduler/commit_earlyout_reason.h" | 14 #include "cc/scheduler/commit_earlyout_reason.h" |
15 #include "cc/scheduler/draw_result.h" | 15 #include "cc/scheduler/draw_result.h" |
16 #include "cc/scheduler/scheduler_settings.h" | 16 #include "cc/scheduler/scheduler_settings.h" |
17 #include "cc/tiles/tile_priority.h" | 17 #include "cc/tiles/tile_priority.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 namespace trace_event { | 20 namespace trace_event { |
21 class ConvertableToTraceFormat; | 21 class ConvertableToTraceFormat; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ACTION_ACTIVATE_SYNC_TREE, | 122 ACTION_ACTIVATE_SYNC_TREE, |
123 ACTION_DRAW_AND_SWAP_IF_POSSIBLE, | 123 ACTION_DRAW_AND_SWAP_IF_POSSIBLE, |
124 ACTION_DRAW_AND_SWAP_FORCED, | 124 ACTION_DRAW_AND_SWAP_FORCED, |
125 ACTION_DRAW_AND_SWAP_ABORT, | 125 ACTION_DRAW_AND_SWAP_ABORT, |
126 ACTION_BEGIN_OUTPUT_SURFACE_CREATION, | 126 ACTION_BEGIN_OUTPUT_SURFACE_CREATION, |
127 ACTION_PREPARE_TILES, | 127 ACTION_PREPARE_TILES, |
128 ACTION_INVALIDATE_OUTPUT_SURFACE, | 128 ACTION_INVALIDATE_OUTPUT_SURFACE, |
129 }; | 129 }; |
130 static const char* ActionToString(Action action); | 130 static const char* ActionToString(Action action); |
131 | 131 |
132 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 132 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
133 void AsValueInto(base::trace_event::TracedValue* dict) const; | 133 void AsValueInto(base::trace_event::TracedValue* dict) const; |
134 | 134 |
135 Action NextAction() const; | 135 Action NextAction() const; |
136 void WillSendBeginMainFrame(); | 136 void WillSendBeginMainFrame(); |
137 void WillCommit(bool commit_had_no_updates); | 137 void WillCommit(bool commit_had_no_updates); |
138 void WillActivate(); | 138 void WillActivate(); |
139 void WillDraw(); | 139 void WillDraw(); |
140 void WillBeginOutputSurfaceCreation(); | 140 void WillBeginOutputSurfaceCreation(); |
141 void WillPrepareTiles(); | 141 void WillPrepareTiles(); |
142 void WillInvalidateOutputSurface(); | 142 void WillInvalidateOutputSurface(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 bool did_draw_in_last_frame_; | 361 bool did_draw_in_last_frame_; |
362 bool did_swap_in_last_frame_; | 362 bool did_swap_in_last_frame_; |
363 | 363 |
364 private: | 364 private: |
365 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); | 365 DISALLOW_COPY_AND_ASSIGN(SchedulerStateMachine); |
366 }; | 366 }; |
367 | 367 |
368 } // namespace cc | 368 } // namespace cc |
369 | 369 |
370 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ | 370 #endif // CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_ |
OLD | NEW |