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
Loading
Please register or sign in to comment