cairo/cairo-f59b0914f4ddbff0d116c918343a6726d5f4317b.patch

39 lines
1.5 KiB
Diff
Raw Normal View History

From f59b0914f4ddbff0d116c918343a6726d5f4317b Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat, 11 Aug 2012 16:38:36 +0000
Subject: egl: s/EGL_KHR_surfaceless_opengl/EGL_KHR_surfaceless_context/
Mesa changed the name of the extension it invented, so check for the
real name and the old name before falling back to pbuffers which are not
supported by most EGL implementations.
References: https://bugs.freedesktop.org/show_bug.cgi?id=53361
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c
index eb1ef29..b24bc80 100644
--- a/src/cairo-egl-context.c
+++ b/src/cairo-egl-context.c
@@ -122,8 +122,10 @@ _egl_make_current_surfaceless(cairo_egl_context_t *ctx)
const char *extensions;
extensions = eglQueryString(ctx->display, EGL_EXTENSIONS);
- if (!strstr(extensions, "EGL_KHR_surfaceless_opengl"))
+ if (strstr(extensions, "EGL_KHR_surfaceless_context") == NULL &&
+ strstr(extensions, "EGL_KHR_surfaceless_opengl") == NULL)
return FALSE;
+
if (!eglMakeCurrent(ctx->display,
EGL_NO_SURFACE, EGL_NO_SURFACE, ctx->context))
return FALSE;
@@ -174,7 +176,6 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
eglChooseConfig (dpy, config_attribs, &config, 1, &numConfigs);
ctx->dummy_surface = eglCreatePbufferSurface (dpy, config, attribs);
-
if (ctx->dummy_surface == NULL) {
free (ctx);
return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY);
--
cgit v0.9.0.2-2-gbebe