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 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1061 forced_redraw_state_ = FORCED_REDRAW_STATE_WAITING_FOR_COMMIT; | 1061 forced_redraw_state_ = FORCED_REDRAW_STATE_WAITING_FOR_COMMIT; |
1062 } | 1062 } |
1063 break; | 1063 break; |
1064 case DrawSwapReadbackResult::DRAW_ABORTED_MISSING_HIGH_RES_CONTENT: | 1064 case DrawSwapReadbackResult::DRAW_ABORTED_MISSING_HIGH_RES_CONTENT: |
1065 // It's not clear whether this missing content is because of missing | 1065 // It's not clear whether this missing content is because of missing |
1066 // pictures (which requires a commit) or because of memory pressure | 1066 // pictures (which requires a commit) or because of memory pressure |
1067 // removing textures (which might not). To be safe, request a commit | 1067 // removing textures (which might not). To be safe, request a commit |
1068 // anyway. | 1068 // anyway. |
1069 needs_commit_ = true; | 1069 needs_commit_ = true; |
1070 break; | 1070 break; |
1071 case DrawSwapReadbackResult::DRAW_ABORTED_CONTEXT_LOST: | |
1072 case DrawSwapReadbackResult::DRAW_ABORTED_CANT_DRAW: | |
1073 case DrawSwapReadbackResult::DRAW_ABORTED_CANT_READBACK: | |
1074 // Nothing to do. | |
danakj
2014/02/13 20:43:55
Should these needs_redraw_ = true; ? That's what w
brianderson
2014/02/14 01:41:50
I think it would be best to combine these states w
| |
1075 break; | |
1071 } | 1076 } |
1072 } | 1077 } |
1073 | 1078 |
1074 void SchedulerStateMachine::SetNeedsCommit() { needs_commit_ = true; } | 1079 void SchedulerStateMachine::SetNeedsCommit() { needs_commit_ = true; } |
1075 | 1080 |
1076 void SchedulerStateMachine::SetNeedsForcedCommitForReadback() { | 1081 void SchedulerStateMachine::SetNeedsForcedCommitForReadback() { |
1077 // If this is called in READBACK_STATE_IDLE, this is a "first" readback | 1082 // If this is called in READBACK_STATE_IDLE, this is a "first" readback |
1078 // request. | 1083 // request. |
1079 // If this is called in READBACK_STATE_WAITING_FOR_REPLACEMENT_COMMIT, this | 1084 // If this is called in READBACK_STATE_WAITING_FOR_REPLACEMENT_COMMIT, this |
1080 // is a back-to-back readback request that started before the replacement | 1085 // is a back-to-back readback request that started before the replacement |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1151 case OUTPUT_SURFACE_ACTIVE: | 1156 case OUTPUT_SURFACE_ACTIVE: |
1152 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: | 1157 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: |
1153 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: | 1158 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: |
1154 return true; | 1159 return true; |
1155 } | 1160 } |
1156 NOTREACHED(); | 1161 NOTREACHED(); |
1157 return false; | 1162 return false; |
1158 } | 1163 } |
1159 | 1164 |
1160 } // namespace cc | 1165 } // namespace cc |
OLD | NEW |