| 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/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return "ACTION_BEGIN_OUTPUT_SURFACE_CREATION"; | 182 return "ACTION_BEGIN_OUTPUT_SURFACE_CREATION"; |
| 183 case ACTION_PREPARE_TILES: | 183 case ACTION_PREPARE_TILES: |
| 184 return "ACTION_PREPARE_TILES"; | 184 return "ACTION_PREPARE_TILES"; |
| 185 case ACTION_INVALIDATE_OUTPUT_SURFACE: | 185 case ACTION_INVALIDATE_OUTPUT_SURFACE: |
| 186 return "ACTION_INVALIDATE_OUTPUT_SURFACE"; | 186 return "ACTION_INVALIDATE_OUTPUT_SURFACE"; |
| 187 } | 187 } |
| 188 NOTREACHED(); | 188 NOTREACHED(); |
| 189 return "???"; | 189 return "???"; |
| 190 } | 190 } |
| 191 | 191 |
| 192 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 192 scoped_ptr<base::trace_event::ConvertableToTraceFormat> |
| 193 SchedulerStateMachine::AsValue() const { | 193 SchedulerStateMachine::AsValue() const { |
| 194 scoped_refptr<base::trace_event::TracedValue> state = | 194 scoped_ptr<base::trace_event::TracedValue> state( |
| 195 new base::trace_event::TracedValue(); | 195 new base::trace_event::TracedValue()); |
| 196 AsValueInto(state.get()); | 196 AsValueInto(state.get()); |
| 197 return state; | 197 return std::move(state); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void SchedulerStateMachine::AsValueInto( | 200 void SchedulerStateMachine::AsValueInto( |
| 201 base::trace_event::TracedValue* state) const { | 201 base::trace_event::TracedValue* state) const { |
| 202 state->BeginDictionary("major_state"); | 202 state->BeginDictionary("major_state"); |
| 203 state->SetString("next_action", ActionToString(NextAction())); | 203 state->SetString("next_action", ActionToString(NextAction())); |
| 204 state->SetString("begin_impl_frame_state", | 204 state->SetString("begin_impl_frame_state", |
| 205 BeginImplFrameStateToString(begin_impl_frame_state_)); | 205 BeginImplFrameStateToString(begin_impl_frame_state_)); |
| 206 state->SetString("begin_main_frame_state", | 206 state->SetString("begin_main_frame_state", |
| 207 BeginMainFrameStateToString(begin_main_frame_state_)); | 207 BeginMainFrameStateToString(begin_main_frame_state_)); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 case OUTPUT_SURFACE_ACTIVE: | 1142 case OUTPUT_SURFACE_ACTIVE: |
| 1143 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: | 1143 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: |
| 1144 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: | 1144 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: |
| 1145 return true; | 1145 return true; |
| 1146 } | 1146 } |
| 1147 NOTREACHED(); | 1147 NOTREACHED(); |
| 1148 return false; | 1148 return false; |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 } // namespace cc | 1151 } // namespace cc |
| OLD | NEW |