| Index: cc/scheduler/scheduler_state_machine.h
|
| diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
|
| index 3272588d56894ee6b27ef4fd2977109052bbba27..e24ed4ea490c39e685077e98f747e5b21c4e3aed 100644
|
| --- a/cc/scheduler/scheduler_state_machine.h
|
| +++ b/cc/scheduler/scheduler_state_machine.h
|
| @@ -5,12 +5,13 @@
|
| #ifndef CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
|
| #define CC_SCHEDULER_SCHEDULER_STATE_MACHINE_H_
|
|
|
| +#include <stdint.h>
|
| +
|
| #include <memory>
|
| #include <string>
|
|
|
| #include "base/macros.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"
|
| @@ -147,14 +148,14 @@ class CC_EXPORT SchedulerStateMachine {
|
| // Indicates that the system has entered and left a BeginImplFrame callback.
|
| // The scheduler will not draw more than once in a given BeginImplFrame
|
| // callback nor send more than one BeginMainFrame message.
|
| - void OnBeginImplFrame();
|
| + void OnBeginImplFrame(uint32_t source_id, uint64_t sequence_number);
|
| // Indicates that the scheduler has entered the draw phase. The scheduler
|
| // will not draw more than once in a single draw phase.
|
| // TODO(sunnyps): Rename OnBeginImplFrameDeadline to OnDraw or similar.
|
| void OnBeginImplFrameDeadline();
|
| void OnBeginImplFrameIdle();
|
|
|
| - int current_frame_number() const { return current_frame_number_; }
|
| + uint64_t current_frame_number() const { return current_frame_number_; }
|
|
|
| BeginImplFrameState begin_impl_frame_state() const {
|
| return begin_impl_frame_state_;
|
| @@ -270,6 +271,9 @@ class CC_EXPORT SchedulerStateMachine {
|
| bool video_needs_begin_frames() const { return video_needs_begin_frames_; }
|
|
|
| bool did_submit_in_last_frame() const { return did_submit_in_last_frame_; }
|
| + uint64_t last_frame_number_compositor_frame_was_fresh() const {
|
| + return last_frame_number_compositor_frame_was_fresh_;
|
| + }
|
|
|
| protected:
|
| bool BeginFrameRequiredForAction() const;
|
| @@ -300,13 +304,17 @@ class CC_EXPORT SchedulerStateMachine {
|
| BeginMainFrameState begin_main_frame_state_;
|
| ForcedRedrawOnTimeoutState forced_redraw_state_;
|
|
|
| - // These are used for tracing only.
|
| + // These are used for tracing and BeginFrame acknowledgments.
|
| int commit_count_;
|
| - int current_frame_number_;
|
| - int last_frame_number_submit_performed_;
|
| - int last_frame_number_draw_performed_;
|
| - int last_frame_number_begin_main_frame_sent_;
|
| - int last_frame_number_invalidate_compositor_frame_sink_performed_;
|
| + uint32_t begin_frame_source_id_;
|
| + uint64_t current_frame_number_;
|
| + uint64_t last_frame_number_submit_performed_;
|
| + uint64_t last_frame_number_draw_performed_;
|
| + uint64_t last_frame_number_begin_main_frame_sent_;
|
| + uint64_t last_frame_number_invalidate_compositor_frame_sink_performed_;
|
| + uint64_t last_frame_number_pending_tree_was_fresh_;
|
| + uint64_t last_frame_number_active_tree_was_fresh_;
|
| + uint64_t last_frame_number_compositor_frame_was_fresh_;
|
|
|
| // These are used to ensure that an action only happens once per frame,
|
| // deadline, etc.
|
|
|