1
0
Fork 0

egl: Allow multiple EGL platforms

The #ifdefs in cogl-winsys-egl have been changed so that they
additionally check renderer->winsys_vtable->id for the corresponding
winsys ID so that multiple EGL platforms can be enabled.

The is a stop-gap solution until we can move all of the EGL platforms
into their own winsys files with overrides of the EGL vtable. However
with this approach we can move one platform at a time which will make
it easier.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts 2011-12-08 17:38:19 +00:00
parent a1e1527b69
commit 93e6e2051f
3 changed files with 849 additions and 719 deletions

View file

@ -98,27 +98,23 @@ typedef struct _CoglDisplayEGL
#endif
EGLContext egl_context;
#if defined (COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT)
EGLSurface dummy_surface;
#elif defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
#ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
struct wl_surface *wayland_surface;
struct wl_egl_window *wayland_egl_native_window;
EGLSurface dummy_surface;
#elif defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_GDL_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT)
#ifndef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
EGLSurface egl_surface;
#else
#endif
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
CoglDisplayKMS kms_display;
#endif
#if defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_GDL_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) || \
defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT)
int egl_surface_width;
int egl_surface_height;
gboolean have_onscreen;
#else
#error "Unknown EGL platform"
#endif
EGLSurface egl_surface;
EGLConfig egl_config;
gboolean found_egl_config;

File diff suppressed because it is too large Load diff

View file

@ -839,11 +839,6 @@ AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11,
[test "x$enable_xlib_egl_platform" = "xyes"])
AS_IF([test $EGL_PLATFORM_COUNT -gt 1],
[AC_MSG_ERROR(['The --enable-*-egl-platform options are currently mutually exclusive'])])
AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
[
PKG_CHECK_EXISTS([egl],