Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to query the transform matrix of a surface texture from the driver #8489

Merged
merged 6 commits into from
Mar 6, 2025

Conversation

ajmalk
Copy link
Contributor

@ajmalk ajmalk commented Mar 5, 2025

From: https://developer.android.com/reference/android/graphics/SurfaceTexture

When sampling from the texture one should first transform the texture coordinates using the matrix queried via getTransformMatrix(float[]). The transform matrix may change each time updateTexImage() is called, so it should be re-queried each time the texture image is updated.

Exposing the matrix to the driver is the first step to being able to apply it to the uniform in the shader.

Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks pretty good. I just would like to return by value instead of output parameter

@pixelflinger pixelflinger requested review from poweifeng and z3moon and removed request for poweifeng March 5, 2025 07:02
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Mar 5, 2025
@ajmalk
Copy link
Contributor Author

ajmalk commented Mar 5, 2025

done

@ajmalk ajmalk requested a review from pixelflinger March 5, 2025 16:51
@ajmalk
Copy link
Contributor Author

ajmalk commented Mar 6, 2025

Can we please merge this in now?

@pixelflinger pixelflinger merged commit 47112f1 into google:main Mar 6, 2025
1 check passed
z3moon pushed a commit that referenced this pull request Mar 10, 2025
… driver (#8489)

* Add a way to query the transform matrix of a surface texture from the driver

BUGS=[399959254]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants