diff options
author | mithro <mithro@mithis.com> | 2014-12-16 19:24:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-17 03:25:08 +0000 |
commit | f7a2150a9767a47f8fe82f2fd2b5a1fbebf99808 (patch) | |
tree | b9060063ee6826a47edc7b9b5dc1d2f8762bce1d /cc/scheduler/scheduler_state_machine.h | |
parent | 0e085c99701289ab553ac857f2c65a12dcc27efb (diff) | |
download | chromium_src-f7a2150a9767a47f8fe82f2fd2b5a1fbebf99808.zip chromium_src-f7a2150a9767a47f8fe82f2fd2b5a1fbebf99808.tar.gz chromium_src-f7a2150a9767a47f8fe82f2fd2b5a1fbebf99808.tar.bz2 |
cc: Adding a CommitEarlyOutReason enum to replace bool in BeginMainFrameAbort method.
The bool is confusing and has meant a bunch of tests have ended up not testing
what they thought they were testing. The new enum clearly delineates between
cases were we abort without handing the commit and when we abort because the
commit was an effective nop.
This also allows new early out reasons to be easily added.
Using a C++ "enum class" to make sure all BeginMainFrameAborted cases are
converted by preventing implicit conversion to bool. Allowed on;
https://chromium-cpp.appspot.com/
BUG=416749
Review URL: https://codereview.chromium.org/793243006
Cr-Commit-Position: refs/heads/master@{#308739}
Diffstat (limited to 'cc/scheduler/scheduler_state_machine.h')
-rw-r--r-- | cc/scheduler/scheduler_state_machine.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h index 7ee039a..4d7bf6f 100644 --- a/cc/scheduler/scheduler_state_machine.h +++ b/cc/scheduler/scheduler_state_machine.h @@ -12,6 +12,7 @@ #include "base/time/time.h" #include "cc/base/cc_export.h" #include "cc/output/begin_frame_args.h" +#include "cc/scheduler/commit_earlyout_reason.h" #include "cc/scheduler/draw_result.h" #include "cc/scheduler/scheduler_settings.h" @@ -206,8 +207,7 @@ class CC_EXPORT SchedulerStateMachine { // Call this only in response to receiving an ACTION_SEND_BEGIN_MAIN_FRAME // from NextAction if the client rejects the BeginMainFrame message. - // If did_handle is false, then another commit will be retried soon. - void BeginMainFrameAborted(bool did_handle); + void BeginMainFrameAborted(CommitEarlyOutReason reason); // Set that we can create the first OutputSurface and start the scheduler. void SetCanStart() { can_start_ = true; } @@ -286,7 +286,7 @@ class CC_EXPORT SchedulerStateMachine { bool HasRequestedSwapThisFrame() const; bool HasSwappedThisFrame() const; - void UpdateStateOnCommit(bool commit_was_aborted); + void UpdateStateOnCommit(bool commit_had_no_updates); void UpdateStateOnActivation(); void UpdateStateOnDraw(bool did_request_swap); void UpdateStateOnPrepareTiles(); |