[cogl/wip/gles2-context: 3/6] EGL: Restore the right surface when popping a foreign context
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/gles2-context: 3/6] EGL: Restore the right surface when popping a foreign context
- Date: Wed, 14 Dec 2011 19:03:41 +0000 (UTC)
commit 4a2c52f8ba90a936de62eda8e714dbc9cd4fce13
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date: Wed Dec 14 09:55:32 2011 +0100
EGL: Restore the right surface when popping a foreign context
cogl/winsys/cogl-winsys-egl.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index c068177..fb6ca43 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1842,9 +1842,10 @@ _cogl_winsys_make_current (CoglGLES2Context *gles2_ctx,
CoglDisplayEGL *egl_display;
CoglRendererEGL *egl_renderer;
EGLContext egl_context;
+ EGLSurface egl_surface;
gboolean result;
- _COGL_GET_CONTEXT (ctx, NO_RETVAL);
+ _COGL_GET_CONTEXT (ctx, FALSE);
egl_display = ctx->display->winsys;
egl_renderer = ctx->display->renderer->winsys;
@@ -1853,15 +1854,17 @@ _cogl_winsys_make_current (CoglGLES2Context *gles2_ctx,
{
ctx = gles2_ctx->context;
egl_context = gles2_ctx->winsys;
+ egl_surface = egl_display->dummy_surface;
}
else
{
egl_context = egl_display->egl_context;
+ egl_surface = ((CoglContextEGL *)ctx->winsys)->current_surface;
}
result = eglMakeCurrent (egl_renderer->edpy,
- egl_display->dummy_surface,
- egl_display->dummy_surface,
+ egl_surface,
+ egl_surface,
egl_context);
if (!result)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]