Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 55fa7272 authored by Ady Abraham's avatar Ady Abraham
Browse files

SurfaceFlinger: decouple EventThread from SF wakeup

Today we have two instances of EventThread:
1. 'app' - used to wake up Choreographer clients
2. 'sf' - used to wake up SF mian thead *and*
          Choreographer clients that uses sf instance

Now this creates an ambiguity when trying to reason about the expected
vsync time and deadline of 'sf' EventThread:
 - SF wakes up sfWorkDuration before a vsync and targets that vsync
 - Choreographer users wakes up with SF main thread but targets the
   vsync that happens after the next SF wakeup.

To resolve this ambiguity we are decoupling SF wakeup from 'sf'
EventThread. This means that Choreographer clients that uses 'sf'
instance will keep using the EventThread but SF will be waking up
directly by a callback with VSyncDispatch. This allows us to correct
the expected vsync and deadline for both.

Test: Interacting with the device and observe systraces
Test: new unit test added to SF suite
Bug: 166302754

Change-Id: I76d154029b4bc1902198074c33d38ff030c4601b
parent 97651d23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment