Android Dev Intro - ANativeWindow




ANativeWindow

The public Surface class is implemented in the Java programming language. The equivalent in C/C++ is the ANativeWindow class, semi-exposed by the Android NDK. You can get the ANativeWindow from a Surface with the ANativeWindow_fromSurface() call. Just like its Java-language cousin, you can lock it, render in software, and unlock-and-post.

To create an EGL window surface from native code, you pass an instance of EGLNativeWindowType toeglCreateWindowSurface(). EGLNativeWindowType is just a synonym for ANativeWindow, so you can freely cast one to the other.

The fact that the basic "native window" type just wraps the producer side of a BufferQueue should not come as a surprise.


阅读更多
个人分类: OS/Android
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Android Dev Intro - ANativeWindow

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭