Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Jetpack Compose version: 1.7.6
Jetpack Compose component(s) used: foundation
When using
AndroidEmbeddedExternalSurface
you can provide a transformation matrix which is useful when you need to control the scale of the surface. But you often need to update the matrix in response to a callback such as getting a video size or the surface size changing. With the current API you need to update some mutable state which will update the matrix during the next composition. But these callbacks can often happen right before a frame is supposed to be drawn so you end up using the wrong transform.Perhaps a better API would be to expose
AndroidEmbeddedExternalSurfaceState
or some other state that lets you update the matrix instantly.