diff options
author | Robert Bragg <robert@linux.intel.com> | 2011-07-05 14:10:31 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-07-05 14:10:31 +0100 |
commit | 6940114b6e28f834e9dd5997f611b881dd09e623 (patch) | |
tree | 92f473ee337644f6ea7b4831573037c288c3b637 | |
parent | ffe3788b851d8ba702edc011a9bba83b8cab569e (diff) | |
download | cogl-6940114b6e28f834e9dd5997f611b881dd09e623.tar.gz |
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>
-rw-r--r-- | 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 fa4a7d7c..e06c80be 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)) { |