Skip to content
Snippets Groups Projects
Commit 370b8b52 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

SF: Update present timing per display

Calculate presentation timing info (i.e. expected- and earliest-
PresentTime) separately for each display, since they are generally not
in sync. This allows SF to present each display at the proper time,
using tools that are already in use for the pacesetter display.

CompositionRefreshArgs:
- Replace earliest- and expected- PresentTime with a map of
  FrameTargets which hold the times.

Output:
- Retrieve appropriate times from the relevant FrameTarget.
- Note: Since HAL virtual displays do not have a FrameTarget, they now
  are provided with the default expected (0) and earliest (nullopt)
  -PresentTimes. This is fine, since these times are irrelevant for
  a virtual display. Previously, they simply used the pacesetter's
  times.
- Trace the expected present time.

Scheduler:
- Compute the expectedPresentTime aka expectedVsyncTime for follower
  displays via the next VSYNC after the pacesetter's
  expectedPresentTime. TODO (b/256196556): The "followers" should
  follow the frontrunner, not the pacesetter.

SurfaceFlinger:
- Populate CompositionRefreshArgs' map of FrameTargets.

For now, continue using the same scheduledFrameTime for all follower
displays. This is only used as a deadline for determining whether to
render a CachedSet. Adjusting it per follower would make us more likely
to render more CachedSets per frame, and we need a more holistic
approach for caching anyway.

Bug: 255601557
Bug: 256196556
Bug: 259132483
Test: perfetto traces
Change-Id: I2c27dc709afd1f33bddbf9c2ca1cd61dd335f66c
parent 0bd0d4c6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment