Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: cc/scheduler/commit_earlyout_reason.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/scheduler/begin_frame_source.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ 5 #ifndef CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_
6 #define CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ 6 #define CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 enum class CommitEarlyOutReason { 12 enum class CommitEarlyOutReason {
13 ABORTED_OUTPUT_SURFACE_LOST, 13 ABORTED_OUTPUT_SURFACE_LOST,
14 ABORTED_NOT_VISIBLE, 14 ABORTED_NOT_VISIBLE,
15 ABORTED_DEFERRED_COMMIT,
15 FINISHED_NO_UPDATES, 16 FINISHED_NO_UPDATES,
16 }; 17 };
17 18
18 inline const char* CommitEarlyOutReasonToString(CommitEarlyOutReason reason) { 19 inline const char* CommitEarlyOutReasonToString(CommitEarlyOutReason reason) {
19 switch (reason) { 20 switch (reason) {
20 case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST: 21 case CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST:
21 return "CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST"; 22 return "CommitEarlyOutReason::ABORTED_OUTPUT_SURFACE_LOST";
22 case CommitEarlyOutReason::ABORTED_NOT_VISIBLE: 23 case CommitEarlyOutReason::ABORTED_NOT_VISIBLE:
23 return "CommitEarlyOutReason::ABORTED_NOT_VISIBLE"; 24 return "CommitEarlyOutReason::ABORTED_NOT_VISIBLE";
25 case CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT:
26 return "CommitEarlyOutReason::ABORTED_DEFERRED_COMMIT";
24 case CommitEarlyOutReason::FINISHED_NO_UPDATES: 27 case CommitEarlyOutReason::FINISHED_NO_UPDATES:
25 return "CommitEarlyOutReason::FINISHED_NO_UPDATES"; 28 return "CommitEarlyOutReason::FINISHED_NO_UPDATES";
26 } 29 }
27 NOTREACHED(); 30 NOTREACHED();
28 return "???"; 31 return "???";
29 } 32 }
30 33
31 inline bool CommitEarlyOutHandledCommit(CommitEarlyOutReason reason) { 34 inline bool CommitEarlyOutHandledCommit(CommitEarlyOutReason reason) {
32 return reason == CommitEarlyOutReason::FINISHED_NO_UPDATES; 35 return reason == CommitEarlyOutReason::FINISHED_NO_UPDATES;
33 } 36 }
34 37
35 } // namespace cc 38 } // namespace cc
36 39
37 #endif // CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_ 40 #endif // CC_SCHEDULER_COMMIT_EARLYOUT_REASON_H_
OLDNEW
« no previous file with comments | « cc/scheduler/begin_frame_source.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698