mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-11 16:50:17 +01:00
egl: Copy glx code to detect the proper surface in acquire
This commit is contained in:
parent
76a721f7e9
commit
faa4e6761c
1 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue