summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author Alejandro Nijamkin <nijamkin@google.com> 2024-02-09 14:30:31 -0800
committer Alejandro Nijamkin <nijamkin@google.com> 2024-02-12 10:34:59 -0800
commitb70482d48e783c22272e4b3cfd42a66837a594e7 (patch)
treef6f86725d07c02268fd6d4ec5e4d5bd212633cdc /libs/hwui/FrameInfoVisualizer.cpp
parentb2c8e3970a8ed61a5c0d9c7fe921843b9bd83c2e (diff)
[flexiglass] SceneDataSource.
In order to support the new TransitionKey API in SceneTransitionLayout (STL), we must switch from using HoistedSceneTransitionLayoutState to using MutableSceneTransitionLayoutState. Unlike HoistedSceneTransitionLayoutState, the MutableSceneTransitionLayoutState keeps the source of truth of the current scene within itself, forcing us to change our architecture in order to source the state of the current scene from MutableSceneTransitionLayoutState and not from our own repository. This is the first CL in a chain. Here we introduce the SceneDataSource interface which, in the next CL, will be used by our SceneContainerRepository as the new source of truth. Complicating matters is the fact that MutableSceneTransitionLayoutState is a Compose-aware construct that must be instantiated (and bound to) within an @Composable function. Therefore, we introduce both SceneTransitionLayoutDataSource (a MutableSceneTransitionLayoutState based implementation of SceneDataSource) and SceneDataSourceDelegator which also implements SceneDataSource and can be provided into our Dagger graph as a normal dependency in build-time but can receive a SceneDataSource as a delegate, during runtime. By doing that, we allow our code in the data layer (the repository) depend on an object provided from the UI layer (the composable) without breaking the Clean Architecture Dependency Rule and without adding a dependency on Jetpack Compose from a part of the codebase that's not yet allowed to do that. Bug: 323173116 Test: unit test included Test: unit tests updated in following CL(s) Test: manual verification done with following CL(s) Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT Change-Id: Ic1aa6aafb6bc8b7d8a133e441a782d377b1ff4e4
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions