How to use ndk's SurfaceControl & SurfaceTransaction

30 views
Skip to first unread message

Zakur0

unread,
Oct 25, 2022, 12:03:39 PM10/25/22
to android-ndk
I am using the ndk-samples as a guide to create a small renderer and I wanted to be able to use the cropping functionality from SurfaceControl API.

I cannot find any source on how to use these ndk functions. Creating a SurfaceControl from aNativeWindow that is being used to create the EGLSurface fails with   SurfaceComposerClient: SurfaceComposerClient::createWithSurfaceParent error Invalid argument


SsageParuders

unread,
Nov 3, 2022, 11:06:22 AM11/3/22
to android-ndk

Zakur0

unread,
Nov 3, 2022, 1:17:33 PM11/3/22
to android-ndk
Holy shit, thank you so much,
I ended up doing something similar by extending the aosp & ndk API just for the window cropping, I wasn't sure if it was an unorthodox approach.
But I had no access  to the SurfaceComposer stuff, that way.

Thanks a lot!
Reply all
Reply to author
Forward
0 new messages