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/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 case DRAW_ABORTED_MISSING_HIGH_RES_CONTENT: | 996 case DRAW_ABORTED_MISSING_HIGH_RES_CONTENT: |
997 // It's not clear whether this missing content is because of missing | 997 // It's not clear whether this missing content is because of missing |
998 // pictures (which requires a commit) or because of memory pressure | 998 // pictures (which requires a commit) or because of memory pressure |
999 // removing textures (which might not). To be safe, request a commit | 999 // removing textures (which might not). To be safe, request a commit |
1000 // anyway. | 1000 // anyway. |
1001 needs_commit_ = true; | 1001 needs_commit_ = true; |
1002 break; | 1002 break; |
1003 } | 1003 } |
1004 } | 1004 } |
1005 | 1005 |
1006 void SchedulerStateMachine::SetNeedsCommit() { needs_commit_ = true; } | 1006 void SchedulerStateMachine::SetNeedsCommit() { |
| 1007 needs_commit_ = true; |
| 1008 } |
1007 | 1009 |
1008 void SchedulerStateMachine::NotifyReadyToCommit() { | 1010 void SchedulerStateMachine::NotifyReadyToCommit() { |
1009 DCHECK(commit_state_ == COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED) << *AsValue(); | 1011 DCHECK(commit_state_ == COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED) << *AsValue(); |
1010 commit_state_ = COMMIT_STATE_READY_TO_COMMIT; | 1012 commit_state_ = COMMIT_STATE_READY_TO_COMMIT; |
1011 } | 1013 } |
1012 | 1014 |
1013 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) { | 1015 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) { |
1014 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT); | 1016 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT); |
1015 if (did_handle) { | 1017 if (did_handle) { |
1016 bool commit_was_aborted = true; | 1018 bool commit_was_aborted = true; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 case OUTPUT_SURFACE_ACTIVE: | 1069 case OUTPUT_SURFACE_ACTIVE: |
1068 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: | 1070 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: |
1069 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: | 1071 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: |
1070 return true; | 1072 return true; |
1071 } | 1073 } |
1072 NOTREACHED(); | 1074 NOTREACHED(); |
1073 return false; | 1075 return false; |
1074 } | 1076 } |
1075 | 1077 |
1076 } // namespace cc | 1078 } // namespace cc |
OLD | NEW |