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:
parent
a1e1527b69
commit
93e6e2051f
@ -98,27 +98,23 @@ typedef struct _CoglDisplayEGL
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
EGLContext egl_context;
|
EGLContext egl_context;
|
||||||
#if defined (COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT)
|
|
||||||
EGLSurface dummy_surface;
|
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_surface *wayland_surface;
|
||||||
struct wl_egl_window *wayland_egl_native_window;
|
struct wl_egl_window *wayland_egl_native_window;
|
||||||
EGLSurface dummy_surface;
|
#endif
|
||||||
#elif defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \
|
#ifdef COGL_HAS_EGL_PLATFORM_KMS_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
|
|
||||||
CoglDisplayKMS kms_display;
|
CoglDisplayKMS kms_display;
|
||||||
#endif
|
#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_width;
|
||||||
int egl_surface_height;
|
int egl_surface_height;
|
||||||
gboolean have_onscreen;
|
gboolean have_onscreen;
|
||||||
#else
|
|
||||||
#error "Unknown EGL platform"
|
|
||||||
#endif
|
#endif
|
||||||
|
EGLSurface egl_surface;
|
||||||
|
|
||||||
EGLConfig egl_config;
|
EGLConfig egl_config;
|
||||||
gboolean found_egl_config;
|
gboolean found_egl_config;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -839,11 +839,6 @@ AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
|
|||||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11,
|
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11,
|
||||||
[test "x$enable_xlib_egl_platform" = "xyes"])
|
[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"],
|
AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
|
||||||
[
|
[
|
||||||
PKG_CHECK_EXISTS([egl],
|
PKG_CHECK_EXISTS([egl],
|
||||||
|
Loading…
Reference in New Issue
Block a user