A display may be shared by multiple threads. Add a mutex for access
control.
{
_EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay));
if (dpy) {
+ _eglInitMutex(&dpy->Mutex);
dpy->NativeDisplay = nativeDisplay;
}
return dpy;
#include "egltypedefs.h"
#include "egldefines.h"
+#include "eglmutex.h"
enum _egl_resource_type {
/* used to link displays */
_EGLDisplay *Next;
+ _EGLMutex Mutex;
+
EGLNativeDisplayType NativeDisplay;
EGLBoolean Initialized; /**< True if the display is initialized */