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 #include "cc/scheduler/scheduler_state_machine.h" | 5 #include "cc/scheduler/scheduler_state_machine.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return "ACTION_MANAGE_TILES"; | 145 return "ACTION_MANAGE_TILES"; |
146 } | 146 } |
147 NOTREACHED(); | 147 NOTREACHED(); |
148 return "???"; | 148 return "???"; |
149 } | 149 } |
150 | 150 |
151 scoped_refptr<base::debug::ConvertableToTraceFormat> | 151 scoped_refptr<base::debug::ConvertableToTraceFormat> |
152 SchedulerStateMachine::AsValue() const { | 152 SchedulerStateMachine::AsValue() const { |
153 scoped_refptr<base::debug::TracedValue> state = | 153 scoped_refptr<base::debug::TracedValue> state = |
154 new base::debug::TracedValue(); | 154 new base::debug::TracedValue(); |
155 AsValueInto(state); | 155 AsValueInto(state.get()); |
156 return state; | 156 return state; |
157 } | 157 } |
158 | 158 |
159 void SchedulerStateMachine::AsValueInto(base::debug::TracedValue* state) const { | 159 void SchedulerStateMachine::AsValueInto(base::debug::TracedValue* state) const { |
160 state->BeginDictionary("major_state"); | 160 state->BeginDictionary("major_state"); |
161 state->SetString("next_action", ActionToString(NextAction())); | 161 state->SetString("next_action", ActionToString(NextAction())); |
162 state->SetString("begin_impl_frame_state", | 162 state->SetString("begin_impl_frame_state", |
163 BeginImplFrameStateToString(begin_impl_frame_state_)); | 163 BeginImplFrameStateToString(begin_impl_frame_state_)); |
164 state->SetString("commit_state", CommitStateToString(commit_state_)); | 164 state->SetString("commit_state", CommitStateToString(commit_state_)); |
165 state->SetString("output_surface_state_", | 165 state->SetString("output_surface_state_", |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 case OUTPUT_SURFACE_ACTIVE: | 1080 case OUTPUT_SURFACE_ACTIVE: |
1081 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: | 1081 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: |
1082 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: | 1082 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: |
1083 return true; | 1083 return true; |
1084 } | 1084 } |
1085 NOTREACHED(); | 1085 NOTREACHED(); |
1086 return false; | 1086 return false; |
1087 } | 1087 } |
1088 | 1088 |
1089 } // namespace cc | 1089 } // namespace cc |
OLD | NEW |