OSDN Git Service

fix crash when validating an invalid EGL objects
authorMathias Agopian <mathias@google.com>
Mon, 14 Nov 2011 04:50:07 +0000 (20:50 -0800)
committerMathias Agopian <mathias@google.com>
Tue, 15 Nov 2011 01:40:21 +0000 (17:40 -0800)
commit274e03c90ee6054e81a16b1bd0a54258e08ddee9
tree1ec08e7176e5253e7561d373e35cf572a1bafe18
parent6b228af6ff20b3f592db4ad5662e1bc401d09b4d
fix crash when validating an invalid EGL objects

the code that validated EGL objects dereferenced the object
to access its EGLDisplay -- needed for validation (!).
This was wrong for two reasons, first we dereferenced the object
before validating it (potentially leading to a crash), secondly
we didn't validate that the object existed in the right EGLDisplay.

We now use the EGLDisplay passed by the user API.

Change-Id: I66f9e851d4f8507892a6b1fee3065f124c4e7138
opengl/libs/EGL/egl.cpp
opengl/libs/EGL/eglApi.cpp
opengl/libs/EGL/egl_display.cpp
opengl/libs/EGL/egl_display.h
opengl/libs/EGL/egl_object.cpp
opengl/libs/EGL/egl_object.h