EGL_ANDROID_image_native_buffer

Supported Hardware

Series6, Series6XE, Series6XT

Valid APIs

EGL 1.2

Description

This extension enables using an Android window buffer (struct ANativeWindowBuffer) as an EGLImage source.

Note

EGL 1.2 is required.

EGL_KHR_image_base is required.

This extension is written against the wording of the EGL 1.2 Specification.

Registry Link

https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_image_native_buffer.txt

Example

ANativeWindowBuffer* sSrcBuffer = graphicBuffer->getNativeBuffer();
EGLint attrs[] = {
    EGL_IMAGE_PRESERVED_KHR,    EGL_TRUE,
    EGL_NONE,
};
EGLImageKHR eglSrcImage =eglCreateImageKHR(eglDisplay, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
(EGLClientBuffer)&sSrcBuffer, attrs);