diff options
Diffstat (limited to 'emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp')
-rw-r--r-- | emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp b/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp index a8c624e..41cf8c4 100644 --- a/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp +++ b/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp @@ -14,10 +14,11 @@ * limitations under the License. */ #include "EglOsApi.h" +#include "emugl/common/mutex.h" + #include <string.h> #include <X11/Xlib.h> #include <GL/glx.h> -#include <utils/threads.h> class ErrorHandler{ @@ -29,7 +30,7 @@ int getLastError(){ return s_lastErrorCode;}; private: static int s_lastErrorCode; int (*m_oldErrorHandler) (Display *, XErrorEvent *); -static android::Mutex s_lock; +static emugl::Mutex s_lock; static int errorHandlerProc(EGLNativeDisplayType dpy,XErrorEvent* event); }; @@ -50,17 +51,17 @@ private: }; int ErrorHandler::s_lastErrorCode = 0; -android::Mutex ErrorHandler::s_lock; +emugl::Mutex ErrorHandler::s_lock; ErrorHandler::ErrorHandler(EGLNativeDisplayType dpy){ - android::Mutex::Autolock mutex(s_lock); + emugl::Mutex::AutoLock mutex(s_lock); XSync(dpy,False); s_lastErrorCode = 0; m_oldErrorHandler = XSetErrorHandler(errorHandlerProc); } ErrorHandler::~ErrorHandler(){ - android::Mutex::Autolock mutex(s_lock); + emugl::Mutex::AutoLock mutex(s_lock); XSetErrorHandler(m_oldErrorHandler); s_lastErrorCode = 0; } |