egl: Add wayland platform
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Fri, 4 Feb 2011 11:22:58 +0000 (12:22 +0100)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Mon, 7 Feb 2011 12:52:29 +0000 (13:52 +0100)
configure.ac
src/egl/Makefile
src/egl/main/Makefile
src/egl/main/egldisplay.c
src/egl/main/egldisplay.h

index 9c6ce3f215018de593fcb6c0a5a44ced82d5f9b7..67cdb15755959e26d530c72bb4055d491d72bb83 100644 (file)
@@ -1536,6 +1536,10 @@ yes)
         if test "$plat" = "fbdev"; then
                 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
         fi
+       if test "$plat" = "wayland"; then
+               PKG_CHECK_MODULES([WAYLAND], [wayland-client],, \
+                                 [AC_MSG_ERROR([cannot find libwayland-client])])
+       fi
     done
     EGL_PLATFORMS="$egl_platforms"
     ;;
index 50f227f07dac1ea9865580231c8c051ae0150014..52daf2efa7e2705dd22cba96ec94acfcfc398aec 100644 (file)
@@ -5,6 +5,10 @@ include $(TOP)/configs/current
 
 SUBDIRS = drivers main
 
+ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
+SUBDIRS += wayland
+endif
+
 
 default: subdirs
 
index c710631688cbcadd549beb220315ec73b8d73bf7..a5b929950205beaf4df4b49a9311145f9afc44ab 100644 (file)
@@ -58,7 +58,7 @@ LOCAL_LIBS =
 ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2)
 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
 LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a
-EGL_LIB_DEPS += $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
+EGL_LIB_DEPS += $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS)
 endif
 ifeq ($(filter glx, $(EGL_DRIVERS_DIRS)),glx)
 LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
@@ -71,6 +71,9 @@ EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM
 ifeq ($(firstword $(EGL_PLATFORMS)),x11)
 EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
 endif
+ifeq ($(firstword $(EGL_PLATFORMS)),wayland)
+EGL_NATIVE_PLATFORM=_EGL_PLATFORM_WAYLAND
+endif
 ifeq ($(firstword $(EGL_PLATFORMS)),drm)
 EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM
 endif
index 565e44d2d23c8fc98d292aaa77983772042d2bdb..305929472975b25de2abb6e766a73a6245e2388b 100644 (file)
@@ -27,6 +27,7 @@ _eglGetNativePlatformFromEnv(void)
    } egl_platforms[_EGL_NUM_PLATFORMS] = {
       { _EGL_PLATFORM_WINDOWS, "gdi" },
       { _EGL_PLATFORM_X11, "x11" },
+      { _EGL_PLATFORM_WAYLAND, "wayland" },
       { _EGL_PLATFORM_DRM, "drm" },
       { _EGL_PLATFORM_FBDEV, "fbdev" }
    };
index dbc5d32d910db654e1ecb46fa5eabbfd0c6b96ed..ce035eb2ef124255003bc3dc2af51ef0c878137a 100644 (file)
@@ -11,6 +11,7 @@
 enum _egl_platform_type {
    _EGL_PLATFORM_WINDOWS,
    _EGL_PLATFORM_X11,
+   _EGL_PLATFORM_WAYLAND,
    _EGL_PLATFORM_DRM,
    _EGL_PLATFORM_FBDEV,