Index: cc/scheduler/commit_earlyout_reason.h |
diff --git a/cc/scheduler/commit_earlyout_reason.h b/cc/scheduler/commit_earlyout_reason.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b45e96f592a42d98ed49770ad89041c8ec22d881 |
--- /dev/null |
+++ b/cc/scheduler/commit_earlyout_reason.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |
+#define CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |
+ |
+#include "base/logging.h" |
+ |
+namespace cc { |
+ |
+enum class CommitEarlyOutReason { |
+ ABORTED_OUTPUT_SURFACE_LOST, |
+ ABORTED_NOT_VISIBLE, |
+ FINISHED_NO_UPDATES, |
+}; |
+ |
+inline const char* CommitEarlyOutReasonToString(CommitEarlyOutReason reason) { |
+ switch (reason) { |
+ case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST: |
+ return "CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST"; |
+ case CommitEarlyOutReason::ABORTED_NOT_VISIBLE: |
+ return "CommitEarlyOutReason::ABORTED_NOT_VISIBLE"; |
+ case CommitEarlyOutReason::FINISHED_NO_UPDATES: |
+ return "CommitEarlyOutReason::FINISHED_NO_UPDATES"; |
+ } |
+ NOTREACHED(); |
+ return "???"; |
+} |
+ |
+inline bool CommitEarlyOutHandledCommit(CommitEarlyOutReason reason) { |
+ return reason == CommitEarlyOutReason::FINISHED_NO_UPDATES; |
+} |
+ |
+} // namespace cc |
+ |
+#endif // CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ |