Rename the EGL_X11 winsys to EGL_XLIB

Eventually we might want to have an XCB-based EGL winsys. We already
have xlib-specific API in CoglRenderer (eg, to set a foreign display)
so the application needs to be able to specifically select between XCB
and XLIB.

This also removes the POWERVR part while renaming
COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT to
COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT because the winsys is equally
applicable to Mesa.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts 2011-12-13 16:23:25 +00:00
parent 3a4dce0c53
commit ff5bfc4a86
6 changed files with 17 additions and 12 deletions

View File

@ -384,7 +384,7 @@ cogl_sources_c += \
$(srcdir)/winsys/cogl-winsys-egl-kms.c \
$(srcdir)/winsys/cogl-winsys-egl-kms-private.h
endif
if SUPPORT_EGL_PLATFORM_POWERVR_X11
if SUPPORT_EGL_PLATFORM_XLIB
cogl_sources_c += \
$(srcdir)/winsys/cogl-winsys-egl-x11.c \
$(srcdir)/winsys/cogl-winsys-egl-x11-private.h

View File

@ -45,7 +45,7 @@
#include "cogl-winsys-stub-private.h"
#include "cogl-config-private.h"
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
#include "cogl-winsys-egl-x11-private.h"
#endif
#ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
@ -82,8 +82,8 @@ static CoglWinsysVtableGetter _cogl_winsys_vtable_getters[] =
#ifdef COGL_HAS_GLX_SUPPORT
_cogl_winsys_glx_get_vtable,
#endif
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
_cogl_winsys_egl_x11_get_vtable,
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
_cogl_winsys_egl_xlib_get_vtable,
#endif
#ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
_cogl_winsys_egl_wayland_get_vtable,

View File

@ -64,7 +64,12 @@ cogl_renderer_new (void);
* @COGL_WINSYS_ID_ANY: Implies no preference for which backend is used
* @COGL_WINSYS_ID_STUB: Use the no-op stub backend
* @COGL_WINSYS_ID_GLX: Use the GLX window system binding API
* @COGL_WINSYS_ID_EGL: Use the Khronos EGL window system binding API
* @COGL_WINSYS_ID_EGL_XLIB: Use EGL with the X window system via XLib
* @COGL_WINSYS_ID_EGL_NULL: Use EGL with the PowerVR NULL window system
* @COGL_WINSYS_ID_EGL_GDL: Use EGL with the GDL platform
* @COGL_WINSYS_ID_EGL_WAYLAND: Use EGL with the Wayland window system
* @COGL_WINSYS_ID_EGL_KMS: Use EGL with the KMS platform
* @COGL_WINSYS_ID_EGL_ANDROID: Use EGL with the Android platform
* @COGL_WINSYS_ID_WGL: Use the Microsoft Windows WGL binding API
*
* Identifies specific window system backends that Cogl supports.
@ -77,7 +82,7 @@ typedef enum
COGL_WINSYS_ID_ANY,
COGL_WINSYS_ID_STUB,
COGL_WINSYS_ID_GLX,
COGL_WINSYS_ID_EGL_X11,
COGL_WINSYS_ID_EGL_XLIB,
COGL_WINSYS_ID_EGL_NULL,
COGL_WINSYS_ID_EGL_GDL,
COGL_WINSYS_ID_EGL_WAYLAND,

View File

@ -27,6 +27,6 @@
#include "cogl-winsys-private.h"
const CoglWinsysVtable *
_cogl_winsys_egl_x11_get_vtable (void);
_cogl_winsys_egl_xlib_get_vtable (void);
#endif /* __COGL_WINSYS_EGL_X11_PRIVATE_H */

View File

@ -682,7 +682,7 @@ _cogl_winsys_egl_vtable =
};
const CoglWinsysVtable *
_cogl_winsys_egl_x11_get_vtable (void)
_cogl_winsys_egl_xlib_get_vtable (void)
{
static gboolean vtable_inited = FALSE;
static CoglWinsysVtable vtable;
@ -694,8 +694,8 @@ _cogl_winsys_egl_x11_get_vtable (void)
vtable = *_cogl_winsys_egl_get_vtable ();
vtable.id = COGL_WINSYS_ID_EGL_X11;
vtable.name = "EGL_X11";
vtable.id = COGL_WINSYS_ID_EGL_XLIB;
vtable.name = "EGL_XLIB";
vtable.renderer_connect = _cogl_winsys_renderer_connect;
vtable.renderer_disconnect = _cogl_winsys_renderer_disconnect;

View File

@ -834,9 +834,9 @@ AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
NEED_XLIB=yes
EGL_PLATFORMS="$EGL_PLATFORMS xlib"
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT"
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT"
])
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11,
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_XLIB,
[test "x$enable_xlib_egl_platform" = "xyes"])
AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],