Age | Commit message (Collapse) | Author |
|
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver. This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
|
|
Refactor attribute list parsing code to _eglParseContextAttribList. Add
a check to make sure the config supports the client API.
|
|
They are either unit tests or to demonstrate how functions are supposed
to be used. The unit test is outdated and it should be better to take a
look at any of the working drivers to see how a function is used.
|
|
A context can be bound to a surface just like it can be bound to a
thread. CurrentContext is a more consistent name.
|
|
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
|
|
_eglMakeCurrent is a big hammer that is not easy to use. Migrate
drivers to use _eglBindContext and un-export _eglMakeCurrent.
|
|
When no context or surface are given, the display is allowed to be
uninitialized. Most drivers cannot handle an uninitialized display.
But they are updated to at least throw a fatal message.
|
|
It works similar to _eglMakeCurrent, except that the old context and
surfaces are returned instead of destroyed. _eglMakeCurrent is now
calling the new _eglBindContext.
|
|
Refactor _eglMakeCurrent into _eglCheckMakeCurrent,
_eglBindContextToSurface, and _eglBindContextToThread.
|
|
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
|
|
Move functions to where they should be. There should be no real change
here.
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc. It also becomes unnecessary for drivers
to call the link functions.
This commit makes eglapi.[ch] do the lookup and check. As a result, the
driver API is overhauled, and almost all sources and drivers need
update. The updates are mainly find and replace with human brains.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This commit uses the newly introduced link functions to manage EGL
contexts and surfaces. As a result of this, the API for drivers are
changed. All drivers are updated for the change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
EGL contexts and surfaces are resources of displays. They should be
managed by displays. This commit adds a bunch of functions to
egldisplay.c to help establish the links between contexts/surfaces and
displays. How links are established is considered opaque outside
display. Functions like _eglGetSurfaceHandle or _eglLookupSurface are
therefore moved to egldisplay.c, with some small modifications.
The idea is also extended to display. That is, displays need to link to
themselves to be looked up.
This commit only adds the functions. A commit to use them should
follow.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
EGL allows multiple current contexts, as long as they are bound to
different client APIs.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This commit introduces a "current" system to manage per-thread info. It
uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined.
If none of them are defined, it uses a dummy implementation that is just
like before.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Move memset() to proper place.
Added EGL_CONTEXT_CLIENT_VERSION query.
Fix bad return EGL_FALSE -> EGL_TRUE.
|
|
|
|
|
|
In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast
between public EGLContext handles and private _EGLContext pointers.
|
|
|
|
|
|
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
|
|
Redo _eglInitContext() to do error checking, attribute list parsing, etc.
|
|
|
|
|
|
|
|
Seems to be mostly working. Not all of egl API is implemented.
|
|
|