OSDN Git Service

egl: call _eglError within _eglParseImageAttribList
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 28 Jun 2017 19:31:18 +0000 (20:31 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 12 Jul 2017 14:42:51 +0000 (15:42 +0100)
commit81e95924ea1411edc5cc82b284e28c56bd236c4a
tree577a7b39bb3f47f826f70342223589f04d73135f
parent9365ff4b885730d76e535edc12445b6f1b72f667
egl: call _eglError within _eglParseImageAttribList

As per EGL_KHR_image_base:

   If an attribute specified in <attrib_list> is not one of the
   attributes listed in Table bbb, the error EGL_BAD_PARAMETER is
   generated.

We should set the error as opposed to simply log it.

Currently we have a partial solution, whereby only some of the callers
call _eglError().

Since that has proven to be less robust, simply set the error by the
function itself and change the return type to EGLBoolean, updating the
callers.

So now the code is slightly simpler. Plus the follow-up fixes will be
easier to manage.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/main/eglimage.c
src/egl/main/eglimage.h