From 6940114b6e28f834e9dd5997f611b881dd09e623 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 5 Jul 2011 14:10:31 +0100 Subject: [PATCH] egl: look for EGL_IMAGE_FROM_X11_PIXMAP as winsys feature instead of looking at the ctx->private_feature_flags to determine if Cogl supports creating an EGLImage from a X Pixmap we now check the renderer private features instead since these are what get setup in check_egl_extensions. The conflicting flags defined in cogl-internal.h should be removed since they are un-used. Signed-off-by: Neil Roberts --- cogl/winsys/cogl-winsys-egl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c index fa4a7d7cf..e06c80be5 100644 --- a/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/winsys/cogl-winsys-egl.c @@ -1553,13 +1553,16 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap) CoglTexturePixmapEGL *egl_tex_pixmap; EGLint attribs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE}; CoglPixelFormat texture_format; + CoglRendererEGL *egl_renderer; /* FIXME: It should be possible to get to a CoglContext from any * CoglTexture pointer. */ _COGL_GET_CONTEXT (ctx, FALSE); - if (!(ctx->private_feature_flags & - COGL_PRIVATE_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP) || + egl_renderer = ctx->display->renderer->winsys; + + if (!(egl_renderer->private_features & + COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP) || !(ctx->private_feature_flags & COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE)) {