summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-06-21 14:01:34 +0200
committerBenjamin Otte <otte@redhat.com>2010-06-22 20:21:15 +0200
commitfaa4e6761c8f74a1acaa7ccc5bc8bb23b2f5cdb1 (patch)
tree88259f9eab149cbb3d3f6585ed511bfcbf58f7d8 /src
parent76a721f7e94fb040f106b200c09c1a7b9ae83d36 (diff)
egl: Copy glx code to detect the proper surface in acquire
Diffstat (limited to 'src')
-rw-r--r--src/cairo-egl-context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c
index 455160c3..607e3bf4 100644
--- a/src/cairo-egl-context.c
+++ b/src/cairo-egl-context.c
@@ -62,6 +62,15 @@ static void
_egl_acquire (void *abstract_ctx)
{
cairo_egl_context_t *ctx = abstract_ctx;
+ EGLSurface current_surface;
+
+ if (ctx->base.current_target == NULL ||
+ _cairo_gl_surface_is_texture (ctx->base.current_target)) {
+ current_surface = ctx->dummy_surface;
+ } else {
+ cairo_egl_surface_t *surface = (cairo_egl_surface_t *) ctx->base.current_target;
+ current_surface = surface->egl ;
+ }
eglMakeCurrent (ctx->display,
ctx->dummy_surface, ctx->dummy_surface, ctx->context);