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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 output_surface_state_ = OUTPUT_SURFACE_ACTIVE; | 606 output_surface_state_ = OUTPUT_SURFACE_ACTIVE; |
607 } | 607 } |
608 } | 608 } |
609 | 609 |
610 // Update state if there's no updates heading for the active tree, but we need | 610 // Update state if there's no updates heading for the active tree, but we need |
611 // to do a forced draw. | 611 // to do a forced draw. |
612 if (commit_has_no_updates && | 612 if (commit_has_no_updates && |
613 forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) { | 613 forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) { |
614 DCHECK(!has_pending_tree_); | 614 DCHECK(!has_pending_tree_); |
615 needs_redraw_ = true; | 615 needs_redraw_ = true; |
616 active_tree_needs_first_draw_ = true; | |
617 } | 616 } |
618 | 617 |
619 // This post-commit work is common to both completed and aborted commits. | 618 // This post-commit work is common to both completed and aborted commits. |
620 pending_tree_is_ready_for_activation_ = false; | 619 pending_tree_is_ready_for_activation_ = false; |
621 | 620 |
622 last_commit_had_no_updates_ = commit_has_no_updates; | 621 last_commit_had_no_updates_ = commit_has_no_updates; |
623 } | 622 } |
624 | 623 |
625 void SchedulerStateMachine::WillActivate() { | 624 void SchedulerStateMachine::WillActivate() { |
626 if (begin_main_frame_state_ == | 625 if (begin_main_frame_state_ == |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 case OUTPUT_SURFACE_ACTIVE: | 1142 case OUTPUT_SURFACE_ACTIVE: |
1144 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: | 1143 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: |
1145 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: | 1144 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: |
1146 return true; | 1145 return true; |
1147 } | 1146 } |
1148 NOTREACHED(); | 1147 NOTREACHED(); |
1149 return false; | 1148 return false; |
1150 } | 1149 } |
1151 | 1150 |
1152 } // namespace cc | 1151 } // namespace cc |
OLD | NEW |