class FrameScheduler
Defined at line 54 of file ../../src/ui/scenic/lib/scheduling/frame_scheduler.h
The FrameScheduler is responsible for scheduling frames to be drawn in response to requests from
clients. When a frame is requested, the FrameScheduler will decide at which Vsync the frame
should be displayed at. This time will be no earlier than the requested time, and will be as
close as possible to the requested time, subject to various constraints. For example, if the
requested time is earlier than the time that rendering would finish, were it started immediately,
then the frame will be scheduled for a later Vsync.
Public Members
static const int64_t kMaxPresentsInFlight
Public Methods
void SetRenderContinuously (bool render_continuously)
If |render_continuously|, we keep scheduling new frames immediately after each presented frame,
regardless of whether they're explicitly requested using RequestFrame().
PresentId RegisterPresent (SessionId session_id, std::vector<zx::event> release_fences, PresentId present_id)
Registers per-present information with the frame scheduler and returns an incrementing
PresentId unique to that session. When not equal to scheduling::kInvalidPresentId, the
|present_id| argument will be used in place of a new PresentId, allowing feed-forward
semantics for clients that need them.
void ScheduleUpdateForSession (zx::time presentation_time, SchedulingIdPair id_pair, bool squashable, bool schedule_asap)
Tell the FrameScheduler to schedule a frame. This is also used for updates triggered by
something other than a Session update i.e. an ImagePipe with a new Image to present.
|squashable| determines if the update is allowed to be combined with a following one in case
of delays.
std::vector<FuturePresentationInfo> GetFuturePresentationInfos (zx::duration requested_prediction_span)
Gets the predicted latch points and presentation times for the frames at or before the next
|requested_prediction_span| time span. Uses the FramePredictor to do so.
void RemoveSession (SessionId session_id)
Removes all references to |session_id|.
void ~FrameScheduler ()
Defined at line 56 of file ../../src/ui/scenic/lib/scheduling/frame_scheduler.h