ANativeWindow_lock returns error -22

500 views
Skip to first unread message

David Seabolt

unread,
Mar 5, 2014, 5:54:53 PM3/5/14
to andro...@googlegroups.com
When I try to lock the window I get an error -22, and then I receive output: E/BufferQueue(  180): [SurfaceView] connect: already connected (cur=1, req=2)
I'm attempting to lock the surface of a subclassed GLSurfaceView, and I'm attempting to draw to that surface without going through EGL, in the hopes that I can just blit a loading screen texture while the EGL thread is loading textures.

Is such a thing even possible?

Voinea Adrian

unread,
Apr 8, 2014, 9:15:19 AM4/8/14
to andro...@googlegroups.com
I have the exact same question.
Did you manage to find any workaround for this?

David Seabolt

unread,
Apr 8, 2014, 11:33:15 AM4/8/14
to andro...@googlegroups.com

I couldn't find an acceptable workaround. It seemed to be a threading issue fighting with OpenGL

--
You received this message because you are subscribed to a topic in the Google Groups "android-ndk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-ndk/9iH3FNxaLeg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.

Philippe Simons

unread,
Apr 8, 2014, 12:51:18 PM4/8/14
to android-ndk
You cant lock a GLSurfaceView because EGL is already taking "ownership" of the Surface.
You need to use a simple SurfaceView.

Philippe


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages