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 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 base::StringAppendF( | 76 base::StringAppendF( |
77 &str, "needs_forced_commit_ = %d; ", needs_forced_commit_); | 77 &str, "needs_forced_commit_ = %d; ", needs_forced_commit_); |
78 base::StringAppendF(&str, | 78 base::StringAppendF(&str, |
79 "expect_immediate_begin_frame_for_main_thread_ = %d; ", | 79 "expect_immediate_begin_frame_for_main_thread_ = %d; ", |
80 expect_immediate_begin_frame_for_main_thread_); | 80 expect_immediate_begin_frame_for_main_thread_); |
81 base::StringAppendF(&str, | 81 base::StringAppendF(&str, |
82 "main_thread_needs_layer_textures_ = %d; ", | 82 "main_thread_needs_layer_textures_ = %d; ", |
83 main_thread_needs_layer_textures_); | 83 main_thread_needs_layer_textures_); |
84 base::StringAppendF(&str, "inside_begin_frame_ = %d; ", | 84 base::StringAppendF(&str, "inside_begin_frame_ = %d; ", |
85 inside_begin_frame_); | 85 inside_begin_frame_); |
86 base::StringAppendF(&str, "last_frame_time_ = %"PRId64"; ", | 86 base::StringAppendF(&str, "last_frame_time_ = %" PRId64 "; ", |
87 (last_begin_frame_args_.frame_time - base::TimeTicks()) | 87 (last_begin_frame_args_.frame_time - base::TimeTicks()) |
88 .InMilliseconds()); | 88 .InMilliseconds()); |
89 base::StringAppendF(&str, "last_deadline_ = %"PRId64"; ", | 89 base::StringAppendF(&str, "last_deadline_ = %" PRId64 "; ", |
90 (last_begin_frame_args_.deadline - base::TimeTicks()).InMilliseconds()); | 90 (last_begin_frame_args_.deadline - base::TimeTicks()).InMilliseconds()); |
91 base::StringAppendF(&str, "last_interval_ = %"PRId64"; ", | 91 base::StringAppendF(&str, "last_interval_ = %" PRId64 "; ", |
92 last_begin_frame_args_.interval.InMilliseconds()); | 92 last_begin_frame_args_.interval.InMilliseconds()); |
93 base::StringAppendF(&str, "visible_ = %d; ", visible_); | 93 base::StringAppendF(&str, "visible_ = %d; ", visible_); |
94 base::StringAppendF(&str, "can_start_ = %d; ", can_start_); | 94 base::StringAppendF(&str, "can_start_ = %d; ", can_start_); |
95 base::StringAppendF(&str, "can_draw_ = %d; ", can_draw_); | 95 base::StringAppendF(&str, "can_draw_ = %d; ", can_draw_); |
96 base::StringAppendF( | 96 base::StringAppendF( |
97 &str, "draw_if_possible_failed_ = %d; ", draw_if_possible_failed_); | 97 &str, "draw_if_possible_failed_ = %d; ", draw_if_possible_failed_); |
98 base::StringAppendF(&str, "has_pending_tree_ = %d; ", has_pending_tree_); | 98 base::StringAppendF(&str, "has_pending_tree_ = %d; ", has_pending_tree_); |
99 base::StringAppendF(&str, "texture_state_ = %d; ", texture_state_); | 99 base::StringAppendF(&str, "texture_state_ = %d; ", texture_state_); |
100 base::StringAppendF( | 100 base::StringAppendF( |
101 &str, "output_surface_state_ = %d; ", output_surface_state_); | 101 &str, "output_surface_state_ = %d; ", output_surface_state_); |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 bool SchedulerStateMachine::HasInitializedOutputSurface() const { | 464 bool SchedulerStateMachine::HasInitializedOutputSurface() const { |
465 return output_surface_state_ == OUTPUT_SURFACE_ACTIVE; | 465 return output_surface_state_ == OUTPUT_SURFACE_ACTIVE; |
466 } | 466 } |
467 | 467 |
468 void SchedulerStateMachine::SetMaximumNumberOfFailedDrawsBeforeDrawIsForced( | 468 void SchedulerStateMachine::SetMaximumNumberOfFailedDrawsBeforeDrawIsForced( |
469 int num_draws) { | 469 int num_draws) { |
470 maximum_number_of_failed_draws_before_draw_is_forced_ = num_draws; | 470 maximum_number_of_failed_draws_before_draw_is_forced_ = num_draws; |
471 } | 471 } |
472 | 472 |
473 } // namespace cc | 473 } // namespace cc |
OLD | NEW |