| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 void SchedulerStateMachine::AsValueInto( | 210 void SchedulerStateMachine::AsValueInto( |
| 211 base::trace_event::TracedValue* state) const { | 211 base::trace_event::TracedValue* state) const { |
| 212 state->BeginDictionary("major_state"); | 212 state->BeginDictionary("major_state"); |
| 213 state->SetString("next_action", ActionToString(NextAction())); | 213 state->SetString("next_action", ActionToString(NextAction())); |
| 214 state->SetString("begin_impl_frame_state", | 214 state->SetString("begin_impl_frame_state", |
| 215 BeginImplFrameStateToString(begin_impl_frame_state_)); | 215 BeginImplFrameStateToString(begin_impl_frame_state_)); |
| 216 state->SetString("begin_main_frame_state", | 216 state->SetString("begin_main_frame_state", |
| 217 BeginMainFrameStateToString(begin_main_frame_state_)); | 217 BeginMainFrameStateToString(begin_main_frame_state_)); |
| 218 state->SetString( | 218 state->SetString( |
| 219 "compositor_frame_sink_state_", | 219 "compositor_frame_sink_state", |
| 220 CompositorFrameSinkStateToString(compositor_frame_sink_state_)); | 220 CompositorFrameSinkStateToString(compositor_frame_sink_state_)); |
| 221 state->SetString("forced_redraw_state", | 221 state->SetString("forced_redraw_state", |
| 222 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_)); | 222 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_)); |
| 223 state->EndDictionary(); | 223 state->EndDictionary(); |
| 224 | 224 |
| 225 state->BeginDictionary("minor_state"); | 225 state->BeginDictionary("minor_state"); |
| 226 state->SetInteger("commit_count", commit_count_); | 226 state->SetInteger("commit_count", commit_count_); |
| 227 state->SetInteger("current_frame_number", current_frame_number_); | 227 state->SetInteger("current_frame_number", current_frame_number_); |
| 228 state->SetInteger("last_frame_number_submit_performed", | 228 state->SetInteger("last_frame_number_submit_performed", |
| 229 last_frame_number_submit_performed_); | 229 last_frame_number_submit_performed_); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 246 state->SetBoolean("funnel: draw_funnel", draw_funnel_); | 246 state->SetBoolean("funnel: draw_funnel", draw_funnel_); |
| 247 state->SetBoolean("funnel: send_begin_main_frame_funnel", | 247 state->SetBoolean("funnel: send_begin_main_frame_funnel", |
| 248 send_begin_main_frame_funnel_); | 248 send_begin_main_frame_funnel_); |
| 249 state->SetInteger("funnel: prepare_tiles_funnel", prepare_tiles_funnel_); | 249 state->SetInteger("funnel: prepare_tiles_funnel", prepare_tiles_funnel_); |
| 250 state->SetBoolean("funnel: invalidate_compositor_frame_sink_funnel", | 250 state->SetBoolean("funnel: invalidate_compositor_frame_sink_funnel", |
| 251 invalidate_compositor_frame_sink_funnel_); | 251 invalidate_compositor_frame_sink_funnel_); |
| 252 state->SetBoolean("funnel: impl_side_invalidation_funnel", | 252 state->SetBoolean("funnel: impl_side_invalidation_funnel", |
| 253 impl_side_invalidation_funnel_); | 253 impl_side_invalidation_funnel_); |
| 254 state->SetInteger("consecutive_checkerboard_animations", | 254 state->SetInteger("consecutive_checkerboard_animations", |
| 255 consecutive_checkerboard_animations_); | 255 consecutive_checkerboard_animations_); |
| 256 state->SetInteger("pending_submit_frames_", pending_submit_frames_); | 256 state->SetInteger("pending_submit_frames", pending_submit_frames_); |
| 257 state->SetInteger("submit_frames_with_current_compositor_frame_sink", | 257 state->SetInteger("submit_frames_with_current_compositor_frame_sink", |
| 258 submit_frames_with_current_compositor_frame_sink_); | 258 submit_frames_with_current_compositor_frame_sink_); |
| 259 state->SetBoolean("needs_redraw", needs_redraw_); | 259 state->SetBoolean("needs_redraw", needs_redraw_); |
| 260 state->SetBoolean("needs_prepare_tiles", needs_prepare_tiles_); | 260 state->SetBoolean("needs_prepare_tiles", needs_prepare_tiles_); |
| 261 state->SetBoolean("needs_begin_main_frame", needs_begin_main_frame_); | 261 state->SetBoolean("needs_begin_main_frame", needs_begin_main_frame_); |
| 262 state->SetBoolean("needs_one_begin_impl_frame", needs_one_begin_impl_frame_); | 262 state->SetBoolean("needs_one_begin_impl_frame", needs_one_begin_impl_frame_); |
| 263 state->SetBoolean("visible", visible_); | 263 state->SetBoolean("visible", visible_); |
| 264 state->SetBoolean("begin_frame_source_paused", begin_frame_source_paused_); | 264 state->SetBoolean("begin_frame_source_paused", begin_frame_source_paused_); |
| 265 state->SetBoolean("can_draw", can_draw_); | 265 state->SetBoolean("can_draw", can_draw_); |
| 266 state->SetBoolean("resourceless_draw", resourceless_draw_); | 266 state->SetBoolean("resourceless_draw", resourceless_draw_); |
| 267 state->SetBoolean("has_pending_tree", has_pending_tree_); | 267 state->SetBoolean("has_pending_tree", has_pending_tree_); |
| 268 state->SetBoolean("pending_tree_is_ready_for_activation", | 268 state->SetBoolean("pending_tree_is_ready_for_activation", |
| 269 pending_tree_is_ready_for_activation_); | 269 pending_tree_is_ready_for_activation_); |
| 270 state->SetBoolean("active_tree_needs_first_draw", | 270 state->SetBoolean("active_tree_needs_first_draw", |
| 271 active_tree_needs_first_draw_); | 271 active_tree_needs_first_draw_); |
| 272 state->SetBoolean("wait_for_ready_to_draw", wait_for_ready_to_draw_); | 272 state->SetBoolean("wait_for_ready_to_draw", wait_for_ready_to_draw_); |
| 273 state->SetBoolean("did_create_and_initialize_first_compositor_frame_sink", | 273 state->SetBoolean("did_create_and_initialize_first_compositor_frame_sink", |
| 274 did_create_and_initialize_first_compositor_frame_sink_); | 274 did_create_and_initialize_first_compositor_frame_sink_); |
| 275 state->SetString("tree_priority", TreePriorityToString(tree_priority_)); | 275 state->SetString("tree_priority", TreePriorityToString(tree_priority_)); |
| 276 state->SetString("scroll_handler_state", | 276 state->SetString("scroll_handler_state", |
| 277 ScrollHandlerStateToString(scroll_handler_state_)); | 277 ScrollHandlerStateToString(scroll_handler_state_)); |
| 278 state->SetBoolean("critical_begin_main_frame_to_activate_is_fast_", | 278 state->SetBoolean("critical_begin_main_frame_to_activate_is_fast", |
| 279 critical_begin_main_frame_to_activate_is_fast_); | 279 critical_begin_main_frame_to_activate_is_fast_); |
| 280 state->SetBoolean("main_thread_missed_last_deadline", | 280 state->SetBoolean("main_thread_missed_last_deadline", |
| 281 main_thread_missed_last_deadline_); | 281 main_thread_missed_last_deadline_); |
| 282 state->SetBoolean("skip_next_begin_main_frame_to_reduce_latency", | 282 state->SetBoolean("skip_next_begin_main_frame_to_reduce_latency", |
| 283 skip_next_begin_main_frame_to_reduce_latency_); | 283 skip_next_begin_main_frame_to_reduce_latency_); |
| 284 state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_); | 284 state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_); |
| 285 state->SetBoolean("defer_commits", defer_commits_); | 285 state->SetBoolean("defer_commits", defer_commits_); |
| 286 state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_); | 286 state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_); |
| 287 state->SetBoolean("did_draw_in_last_frame", did_draw_in_last_frame_); | 287 state->SetBoolean("did_draw_in_last_frame", did_draw_in_last_frame_); |
| 288 state->SetBoolean("did_submit_in_last_frame", did_submit_in_last_frame_); | 288 state->SetBoolean("did_submit_in_last_frame", did_submit_in_last_frame_); |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 case COMPOSITOR_FRAME_SINK_ACTIVE: | 1335 case COMPOSITOR_FRAME_SINK_ACTIVE: |
| 1336 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_COMMIT: | 1336 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_COMMIT: |
| 1337 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_ACTIVATION: | 1337 case COMPOSITOR_FRAME_SINK_WAITING_FOR_FIRST_ACTIVATION: |
| 1338 return true; | 1338 return true; |
| 1339 } | 1339 } |
| 1340 NOTREACHED(); | 1340 NOTREACHED(); |
| 1341 return false; | 1341 return false; |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 } // namespace cc | 1344 } // namespace cc |
| OLD | NEW |