[cogl/wip/gles2-context: 3/12] 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/12] EGL: Restore the right surface when popping a foreign context
- Date: Thu, 29 Dec 2011 09:55:00 +0000 (UTC)
commit 17cdfd85391b10dc435bcdae1988783b8413441a
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 5888d8f..789aaf3 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -709,9 +709,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;
@@ -720,15 +721,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]