OSDN Git Service

egl/android: Fix error condition for EGL_ANDROID_image_native_buffer
authorChad Versace <chad.versace@linux.intel.com>
Mon, 6 May 2013 14:41:11 +0000 (07:41 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Wed, 22 May 2013 17:17:44 +0000 (10:17 -0700)
commit072a4fba4631d94a9be22f7f75cf247c55fea698
tree2f4aa481a8ddc4bb57c8776aa97faa469f9ae507
parentaec0139c837b31666f87b37b14b17a26d2d59d68
egl/android: Fix error condition for EGL_ANDROID_image_native_buffer

Emit EGL_BAD_CONTEXT if the user passes a context to
eglCreateImageKHR(type=EGL_ANDROID_image_native_buffer).

From the EGL_ANDROID_image_native_buffer spec:
  * If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not
    EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated.

Note: This is a candidate for the stable branches.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Change-Id: I01c4f09aaa13fc01a75b5a721b85df6a99e2072a
src/egl/drivers/dri2/platform_android.c