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

Skip to content
Commit b7dfe500 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Optimize Compose QS recompositions (1/2)

This CL optimizes the Compose QS recompositions by:

1. Making sure that Modifier.bounceable() and Modifier.sysuiResTag() do
   not invalidate a Modifier chain whenever they are recomposed.
2. Initializing the power button by the current value it should have
   rather than null. This prevents the composition of the power button
   to happen on the 2nd or 3rd frame when transitioning from QQS to QS.
3. Ensuring that the brightness slider does not recompose once its icon
   is available.
4. Ensuring that the build number does not recompose on 2nd or 3rd frame
   by caching its last value accross recompositions in a StateFlow
   inside the associated interactor.
5. Annotating a bunch of stable generic classes with @Stable.

Bug: 389985793
Test: Manual, observed the difference of recompositions in Perfetto and
 go/hsv
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Change-Id: I55186bb14630f1a41999ecc2773f6bfcf64eb05a
parent e18a7dcf
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