Read transitions during composition instead of layout/drawing

This CL moves the read of the current transition during composition and
passes it to the element() Modifier. This ensures that new values of the
current transition are first seen during composition, then during
layout/drawing. See b/341072461 for details.

This CL is expected to have a slight negative impact on performance.
Preliminary experiments show a noticeable increase of P99 frame time in
the STL benchmarks and a very small increase in dropped frames. See the
dashboard at http://shortn/_x4sPtuA694.

Bug: 341072461
Test: atest PlatformSceneTransitionLayoutTests
Test: atest ElementTest
Flag: com.android.systemui.scene_container
Change-Id: Ie02f4ed0d6b1910a235637c6cb072a7ce2639b17
4 files changed