wayland: set renderable type on dummy surface

Make sure it's compatible with the API that's in use.
This commit is contained in:
nobled 2011-02-08 15:53:08 +00:00
parent 20b1350614
commit c1a27d481b

View File

@ -337,12 +337,23 @@ clutter_backend_wayland_post_parse (ClutterBackend *backend,
return TRUE; return TRUE;
} }
#if defined(HAVE_COGL_GL)
#define _COGL_RENDERABLE_BIT EGL_OPENGL_BIT
#elif defined(HAVE_COGL_GLES2)
#define _COGL_GLES_VERSION 2
#define _COGL_RENDERABLE_BIT EGL_OPENGL_ES2_BIT
#elif defined(HAVE_COGL_GLES)
#define _COGL_GLES_VERSION 1
#define _COGL_RENDERABLE_BIT EGL_OPENGL_ES_BIT
#endif
static gboolean static gboolean
make_dummy_surface (ClutterBackendWayland *backend_wayland) make_dummy_surface (ClutterBackendWayland *backend_wayland)
{ {
static const EGLint attrs[] = { static const EGLint attrs[] = {
EGL_WIDTH, 1, EGL_WIDTH, 1,
EGL_HEIGHT, 1, EGL_HEIGHT, 1,
EGL_RENDERABLE_TYPE, _COGL_RENDERABLE_BIT,
EGL_NONE }; EGL_NONE };
EGLint num_configs; EGLint num_configs;
@ -362,12 +373,6 @@ make_dummy_surface (ClutterBackendWayland *backend_wayland)
return TRUE; return TRUE;
} }
#if defined(HAVE_COGL_GLES2)
#define _COGL_GLES_VERSION 2
#elif defined(HAVE_COGL_GLES)
#define _COGL_GLES_VERSION 1
#endif
static gboolean static gboolean
try_create_context (ClutterBackend *backend, try_create_context (ClutterBackend *backend,
int retry_cookie, int retry_cookie,