[cogl] egl: look for EGL_IMAGE_FROM_X11_PIXMAP as winsys feature



commit 6940114b6e28f834e9dd5997f611b881dd09e623
Author: Robert Bragg <robert linux intel com>
Date:   Tue Jul 5 14:10:31 2011 +0100

    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 <neil linux intel com>

 cogl/winsys/cogl-winsys-egl.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index fa4a7d7..e06c80b 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))
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]