summaryrefslogtreecommitdiff
path: root/opengl/libagl/matrix.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2009-08-21 02:18:25 -0700
committer Mathias Agopian <mathias@google.com> 2009-08-21 19:45:44 -0700
commit9429e9c8ad8ae41104c693235a9376b3086da2e9 (patch)
tree2411cbfd9f7d8b7709102d9fd5cdb6524af60a18 /opengl/libagl/matrix.cpp
parentdcab2ad3b639bdad89c16210db985e9a049e263d (diff)
first step for fixing [2066786] EGL object lifetime management doesn't respect the EGL spec
this change fixes the lifetime mgt of EGLSurface, EGLContext and EGLImageKHR in the EGL wrapper. EGLDisplay is still somewhat bogus and libagl's EGL is still incorrect. The idea of the change is that EGL objects are put in a list when created and removed when destroyed. Before each use, we first verify if the object is in the list and if so a reference is taken and kept for the scope of the whole EGL API being called, if not, an error is returned. Upon object destruction, the object is simply marked as "terminated" (this is not protected by a lock because it doesn't really matter). This flag is only used to deny access to the object by other APIs while it's still valid (for instance current or being used by another function in another thread). A reference is also removed and the object can then actually be destroyed when going out of scope.
Diffstat (limited to 'opengl/libagl/matrix.cpp')
0 files changed, 0 insertions, 0 deletions