Compose 1.6.0-alpha06 is out and adds Composables for SurfaceView and TextureView, called GraphicsSurface() and EmbeddedGraphicsSurface(). The API is much easier to use, see the sample in the docs: https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#GraphicsSurface(androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.GraphicsSurfaceZOrder,androidx.compose.ui.unit.IntSize,kotlin.Boolean,kotlin.Function1)

(Names may change)

@romainguy yay thank for this, will make using filament with compose even easier