diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-11 17:38:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-11 17:42:17 +0100 |
commit | f59b0914f4ddbff0d116c918343a6726d5f4317b (patch) | |
tree | 6d39ad66a09bced11b75fdb50796e38f4ac97e56 | |
parent | b438e583089229d934df48e6fbf0edcd1b23dcd4 (diff) |
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>
-rw-r--r-- | src/cairo-egl-context.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c index eb1ef296f..b24bc808c 100644 --- a/src/cairo-egl-context.c +++ b/src/cairo-egl-context.c @@ -119,14 +119,16 @@ _egl_destroy (void *abstract_ctx) static cairo_bool_t _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; return TRUE; } @@ -171,13 +173,12 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl) * that the configs must be the same. */ eglQueryContext (dpy, egl, EGL_CONFIG_ID, &config_attribs[1]); 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); } if (!eglMakeCurrent (dpy, ctx->dummy_surface, ctx->dummy_surface, egl)) { |