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

Skip to content
Commit 1238d032 authored by Steven Terrell's avatar Steven Terrell
Browse files

Use Choreographer from ViewRootImpl

This change adds a method to retrieve the choreographer instance that is
tied to the ViewRootImpl. It also updates JankTracker to use that
instance instead of using the global choreographer instance. This should
ensure the vsync ids we are using to keep track of active states line up
with the ids that are being returned by OnJankDataListener.

With this change the instantiation of StateTracker and JankDataProcessor
are now delayed until after the OnWindowAttachListener is invoked. This
was required as the DecorView still returns null when calling
getViewRootImpl while JankTracker is instantiated within the Activity.
StateTracker has a dependency on Choreographer so an active instance of
ViewRootImpl is required to obtain that.

Change-Id: I41728d4488bfb2df7d3c355ff8713cc673d13fc8
Bug: 377960907
Test: atest CoreAppJankTestCases
Flag: android.app.jank.viewroot_choreographer
parent 3e8d96c9
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