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

Commit 2feb2214 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

BouncyBall: Detect dropped frames via Choreographer

We use Choreographer.FrameCallback to find out within the app
when we've dropped a frame.  Since our doFrame() callback is
only invoked when a new display frame is being rendered, we
only get data at (about) the resolution of the targeted frame
time.

So this data is good enough to detect dropped frames, but not
helpful for seeing how close we are to dropping, or how much
over deadline we were.  We'll be using perfetto to get that
data.  But these changes allow the app to self-report the most
basic of data.

We upgrade a couple log messages from Debug to Info, since they
are rare (only at startup), and lets folks know what frame rate
we're testing at.

We add (off-by-default) logic to drop occasional frames, and
to log on every frame, to aid in debugging and testing the
process itself.

Bug: 408044970
Test: Ran with and without FORCE_DROPPED_FRAMES and LOG_EVERY_FRAME, getting the expected behavior in all cases.
Flag: EXEMPT for test app
Change-Id: I275ae8775af275d1743ecdecacb628a556e3a9d6
parent 2a85664a
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