Commit Graph

20 Commits

Author SHA1 Message Date
Chad Versace 97851145bc egl: Kill macro _EGL_DECLARE_MUTEX
Replace all occurences of the macro with its expansion.

It seems that the macro intended to provide cross-platform static mutex
intialization. However, it had the same definition in all pre-processor
paths:
    #define _EGL_DECLARE_MUTEX(m) _EGLMutex m = _EGL_MUTEX_INITIALIZER

Therefore this abstraction obscured rather than helped.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-11-26 12:50:30 -08:00
Matt Turner 814345f54b build: Use AX_PTHREAD's HAVE_PTHREAD preprocessor definition 2012-10-01 15:23:04 -07:00
Matt Turner 2b7a972e3f Don't cast the return value of malloc/realloc
This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)
2012-09-05 22:28:50 -07:00
Chia-I Wu f2001df508 egl: add copyright notices
The list of copyright holders could be incomplete.  Please update
directly or notify me if your name is missing.
2011-07-02 18:21:31 +09:00
Brian Paul e227f4bf50 egl: add missing case in _eglError() 2010-12-31 09:14:25 -07:00
Chia-I Wu c9186bd588 egl: Set up the pthread key even TLS is used.
We have to rely on the pthread key destructor to free the current thread
info when a thread exits.
2010-11-03 13:34:17 +08:00
Vinson Lee db71bdc31c egl: Fix '_eglAddAtExitCall' implicit declaration warning. 2010-07-31 13:28:32 -07:00
Chia-I Wu 6c7e0b95a4 egl: Add checks for EGL_MESA_screen_surface.
This allows Mesa EGL to be compiled with eglext.h that does not define
EGL_MESA_screen_surface.
2010-07-31 17:49:32 +08:00
Chia-I Wu 3dee01a692 egl: Always record error code.
The error code denotes the success or failure of the most recent
function call.  A call to _eglError should always update the error code.
2010-02-17 20:00:11 +08:00
Vinson Lee 19af9ea792 egl: Remove unnecessary headers. 2010-01-31 21:56:53 -08:00
Chia-I Wu 94cb321b5d egl: Clean up header inclusions.
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-30 22:55:49 +08:00
Chia-I Wu a1717970e7 egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.
They have little use in drivers since drivers need to work for multiple
current contexts.
2010-01-26 18:46:05 +08:00
Chia-I Wu 6f6f3e4227 egl: Add _eglGetAPIContext.
It will return the currently bound context of the given API.
2010-01-26 18:46:05 +08:00
Chia-I Wu ecb3b3102a egl: Make surfaces and contexts resources.
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
2010-01-24 20:38:16 +08:00
Chia-I Wu 29d115092e egl: Fix GLX_USE_TLS build.
Remove an extraneous semicolon.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:56 -06:00
Chia-I Wu 310c76812e egl: Allow binding to any client API.
As a result, EGL_NONE is no longer a valid client API.  And it is
possible that no config supports the current bound API.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13 12:00:36 -06:00
Chia-I Wu 64e7bb3262 egl: Use _eglAddAtExitCall to free thread infos and displays.
Thread infos and displays are usually not freed by applications.  This
commit add atexit calls to free them.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu 56d2119280 egl: Initialize current thread management on demand.
Current thread management was initialized in _eglInitGlobals, which is
called only in eglGetDisplay.  Since EGL does not require eglGetDisplay
to be called first, the initialization is better to be done on demand.

_eglFiniCurrent is removed, as it is not called at all.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu f6c2f5e379 egl: Destroy eglThreadInfo on thread exit.
This is done through pthread TSD destructor.  It destroys all thread
infos except for main thread's.  The thread info of the main thread is
destroyed by _eglFiniCurrent.

TLS case is not supported yet.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Brian Paul 40fd101919 egl: commit missing eglcurrent.[ch] files
Not sure how these got left out from earlier commit.
2009-07-17 13:36:58 -06:00