OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |
| 6 #define CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |
| 7 |
| 8 #include "base/logging.h" |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 enum class CommitEarlyOutReason { |
| 13 ABORTED_OUTPUT_SURFACE_LOST, |
| 14 ABORTED_NOT_VISIBLE, |
| 15 FINISHED_NO_UPDATES, |
| 16 }; |
| 17 |
| 18 inline const char* CommitEarlyOutReasonToString(CommitEarlyOutReason reason) { |
| 19 switch (reason) { |
| 20 case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST: |
| 21 return "CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST"; |
| 22 case CommitEarlyOutReason::ABORTED_NOT_VISIBLE: |
| 23 return "CommitEarlyOutReason::ABORTED_NOT_VISIBLE"; |
| 24 case CommitEarlyOutReason::FINISHED_NO_UPDATES: |
| 25 return "CommitEarlyOutReason::FINISHED_NO_UPDATES"; |
| 26 } |
| 27 NOTREACHED(); |
| 28 return "???"; |
| 29 } |
| 30 |
| 31 inline bool CommitEarlyOutHandledCommit(CommitEarlyOutReason reason) { |
| 32 return reason == CommitEarlyOutReason::FINISHED_NO_UPDATES; |
| 33 } |
| 34 |
| 35 } // namespace cc |
| 36 |
| 37 #endif // CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |
OLD | NEW |