summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcontext.h
AgeCommit message (Collapse)Author
2010-10-23egl: Use reference counting to replace IsLinked or IsBound.Chia-I Wu
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update _eglBindContext and drivers to do reference counting.
2010-10-23egl: Add reference count for resources.Chia-I Wu
This is a really simple mechanism. There is no atomicity and the caller is expected to hold the display lock.
2010-10-23egl: Drop dpy argument from the link functions.Chia-I Wu
All display resources are already initialized with a display. Linking simply links a resource to its display.
2010-10-22egl: Move fallback routines to eglfallbacks.c.Chia-I Wu
We do not want them to be all over the places.
2010-02-05egl: Clarify IsLinked and IsBound.Chia-I Wu
Both a link and a binding creates a reference to the resource. Drivers should not destroy the resource when there is a reference. The difference is better described in doc/egl.html.
2010-01-31egl: Initialize display resources with their display.Chia-I Wu
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.
2010-01-30egl: Clean up header inclusions.Chia-I Wu
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-28egl: Migrate drivers to use _eglBindContext.Chia-I Wu
_eglMakeCurrent is a big hammer that is not easy to use. Migrate drivers to use _eglBindContext and un-export _eglMakeCurrent.
2010-01-28egl: Add _eglBindContext.Chia-I Wu
It works similar to _eglMakeCurrent, except that the old context and surfaces are returned instead of destroyed. _eglMakeCurrent is now calling the new _eglBindContext.
2010-01-25egl: Make resource void pointer in _eglCheckResource.Chia-I Wu
This emphasizes the fact that the resource to be checked could really be invalid and have an unknown type.
2010-01-24egl: Make surfaces and contexts resources.Chia-I Wu
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be managed uniformly.
2010-01-24egl: Move context functions in egldisplay.[ch] to eglcontext.[ch].Chia-I Wu
Move functions to where they should be. There should be no real change here.
2010-01-05egl: Fix breakage from -fvisibility=hidden.Chia-I Wu
Mark EGL API and driver functions as PUBLIC. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29egl: Add support for querying render buffer.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Overhaul driver API.Chia-I Wu
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>
2009-08-03egl: Replace IsBound by a pointer to the binding.Chia-I Wu
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>
2009-07-17egl: Remove redundant DeletePending flag.Chia-I Wu
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>
2009-07-17egl: Use the link functions to manage resources.Chia-I Wu
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>
2009-07-17egl: Add funtions to link contexts and surfaces to displays.Chia-I Wu
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>
2009-07-17egl: Support per-thread info.Chia-I Wu
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>
2008-05-30egl: clean-up re-org of the client API stateBrian Paul
2008-05-27eliminate the context hash tableBrian Paul
In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast between public EGLContext handles and private _EGLContext pointers.
2006-01-30some initial EGL 1.2 workBrian Paul
2005-11-27Redo _eglInitSurface() so it can be used with all surface types.Brian Paul
Redo _eglInitContext() to do error checking, attribute list parsing, etc.
2005-05-16use EGLint instead of unsigned long for eglCopyContextMESA, added commentsBrian Paul
2005-05-14Add empty placeholder for eglCopyContextMESAJon Smirl
2005-04-22initial EGL codeBrian Paul