diff --git a/VERSION b/VERSION index 1de8cd25..097c6efc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-204-gdc3e89e65c+1 \ No newline at end of file +B1-205-g01bfd2e090+1 \ No newline at end of file diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 7e0a0deb..a0ba3794 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -300,20 +300,6 @@ bool egl_on_mouse_event(void * opaque, const bool visible, const int x, const in return true; } -void egl_lock(void * opaque) -{ - struct Inst * this = (struct Inst *)opaque; - LG_LOCK(this->lock); - eglMakeCurrent(this->display, this->surface, this->surface, this->frameContext); -} - -void egl_unlock(void * opaque) -{ - struct Inst * this = (struct Inst *)opaque; - eglMakeCurrent(this->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - LG_UNLOCK(this->lock); -} - bool egl_on_frame_event(void * opaque, const LG_RendererFormat format, const FrameBuffer * frame) { struct Inst * this = (struct Inst *)opaque; @@ -329,20 +315,6 @@ bool egl_on_frame_event(void * opaque, const LG_RendererFormat format, const Fra this->useNearest = this->width < format.width || this->height < format.height; - if (!this->frameContext) - { - static EGLint attrs[] = { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE - }; - - if (!(this->frameContext = eglCreateContext(this->display, this->configs, this->context, attrs))) - { - DEBUG_ERROR("Failed to create the frame context"); - return false; - } - } - if (!egl_desktop_update(this->desktop, sourceChanged, format, frame)) { DEBUG_INFO("Failed to to update the desktop"); @@ -534,6 +506,32 @@ bool egl_render_startup(void * opaque, SDL_Window * window) return true; } +void egl_lock(void * opaque) +{ + struct Inst * this = (struct Inst *)opaque; + + if (!this->frameContext) + { + static EGLint attrs[] = { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + if (!(this->frameContext = eglCreateContext(this->display, this->configs, this->context, attrs))) + DEBUG_ERROR("Failed to create the frame context"); + } + + LG_LOCK(this->lock); + eglMakeCurrent(this->display, this->surface, this->surface, this->frameContext); +} + +void egl_unlock(void * opaque) +{ + struct Inst * this = (struct Inst *)opaque; + eglMakeCurrent(this->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + LG_UNLOCK(this->lock); +} + bool egl_render_begin(void * opaque, SDL_Window * window) { struct Inst * this = (struct Inst *)opaque;