Refactor animate(Scene|Element)FooAsState (1/2)
This CL refactors animate(Scene|Element)FooAsState so that it does not need to access the associated Element during composition. This should allow the simplification of Modifier.element itself and remove all calls to Snapshot.withoutReadObservation {}. A major side effect of this CL is that reading the returned State value during composition will now throw an exception. This is a good thing, because animated values should never be read during composition anyways, and before this CL we could get invalid values that were 1 frame behind. Bug: 317026105 Test: AnimatedSharedAsStateTest Flag: N/A Change-Id: I20d247e9cc6a8f48e8f611421e5b3d56fc091dba
Loading
Please register or sign in to comment