Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / cc / scheduler / commit_earlyout_reason.h
blob14aaeb3b7d919c765f665f16de0454b43e5af9f5
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.
5 #ifndef CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_
6 #define CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_
8 #include "base/logging.h"
10 namespace cc {
12 enum class CommitEarlyOutReason {
13 ABORTED_OUTPUT_SURFACE_LOST,
14 ABORTED_NOT_VISIBLE,
15 ABORTED_DEFERRED_COMMIT,
16 FINISHED_NO_UPDATES,
19 inline const char* CommitEarlyOutReasonToString(CommitEarlyOutReason reason) {
20 switch (reason) {
21 case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST:
22 return "CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST";
23 case CommitEarlyOutReason::ABORTED_NOT_VISIBLE:
24 return "CommitEarlyOutReason::ABORTED_NOT_VISIBLE";
25 case CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT:
26 return "CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT";
27 case CommitEarlyOutReason::FINISHED_NO_UPDATES:
28 return "CommitEarlyOutReason::FINISHED_NO_UPDATES";
30 NOTREACHED();
31 return "???";
34 inline bool CommitEarlyOutHandledCommit(CommitEarlyOutReason reason) {
35 return reason == CommitEarlyOutReason::FINISHED_NO_UPDATES;
38 } // namespace cc
40 #endif // CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_