| 1 |
commit f59b0914f4ddbff0d116c918343a6726d5f4317b |
| 2 |
Author: Chris Wilson <chris@chris-wilson.co.uk> |
| 3 |
Date: Sat Aug 11 17:38:36 2012 +0100 |
| 4 |
|
| 5 |
egl: s/EGL_KHR_surfaceless_opengl/EGL_KHR_surfaceless_context/ |
| 6 |
|
| 7 |
Mesa changed the name of the extension it invented, so check for the |
| 8 |
real name and the old name before falling back to pbuffers which are not |
| 9 |
supported by most EGL implementations. |
| 10 |
|
| 11 |
References: https://bugs.freedesktop.org/show_bug.cgi?id=53361 |
| 12 |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> |
| 13 |
|
| 14 |
diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c |
| 15 |
index eb1ef29..b24bc80 100644 |
| 16 |
--- a/src/cairo-egl-context.c |
| 17 |
+++ b/src/cairo-egl-context.c |
| 18 |
@@ -122,8 +122,10 @@ _egl_make_current_surfaceless(cairo_egl_context_t *ctx) |
| 19 |
const char *extensions; |
| 20 |
|
| 21 |
extensions = eglQueryString(ctx->display, EGL_EXTENSIONS); |
| 22 |
- if (!strstr(extensions, "EGL_KHR_surfaceless_opengl")) |
| 23 |
+ if (strstr(extensions, "EGL_KHR_surfaceless_context") == NULL && |
| 24 |
+ strstr(extensions, "EGL_KHR_surfaceless_opengl") == NULL) |
| 25 |
return FALSE; |
| 26 |
+ |
| 27 |
if (!eglMakeCurrent(ctx->display, |
| 28 |
EGL_NO_SURFACE, EGL_NO_SURFACE, ctx->context)) |
| 29 |
return FALSE; |
| 30 |
@@ -174,7 +176,6 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl) |
| 31 |
eglChooseConfig (dpy, config_attribs, &config, 1, &numConfigs); |
| 32 |
|
| 33 |
ctx->dummy_surface = eglCreatePbufferSurface (dpy, config, attribs); |
| 34 |
- |
| 35 |
if (ctx->dummy_surface == NULL) { |
| 36 |
free (ctx); |
| 37 |
return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY); |