summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-04-11 09:47:30 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-04-11 18:04:33 -0700
commit3b8d296ea82bdbad3f59604cabfec42df73dcc18 (patch)
tree91a5b3f3bdc8b807c1cd07a96f611104c2924cef
parent27830f751e12b8b34221387db6bc935b12a9ba4b (diff)
core: Create and destroy wayland_platform
If the WAFFLE_PLATFORM attribute is WAFFLE_PLATFORM_WAYLAND, then create/destroy a wayland_platform in wcore_platform_create/destroy. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/waffle/core/wcore_platform.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/waffle/core/wcore_platform.c b/src/waffle/core/wcore_platform.c
index 50ed4c1..b065a32 100644
--- a/src/waffle/core/wcore_platform.c
+++ b/src/waffle/core/wcore_platform.c
@@ -21,6 +21,7 @@
#include <waffle/waffle_enum.h>
#include <waffle/glx/glx_platform.h>
+#include <waffle/wayland/wayland_platform.h>
#include <waffle/x11_egl/xegl_platform.h>
#include "wcore_error.h"
@@ -52,6 +53,11 @@ wcore_platform_create(int platform, int gl_api)
if (!self->native)
goto error;
break;
+ case WAFFLE_PLATFORM_WAYLAND:
+ self->native = wayland_platform_create(gl_api, &self->dispatch);
+ if (!self->native)
+ goto error;
+ break;
case WAFFLE_PLATFORM_X11_EGL:
self->native = xegl_platform_create(gl_api, &self->dispatch);
if (!self->native)
@@ -85,6 +91,9 @@ wcore_platform_destroy(struct wcore_platform *self)
case WAFFLE_PLATFORM_GLX:
ok &= glx_platform_destroy(self->native);
break;
+ case WAFFLE_PLATFORM_WAYLAND:
+ ok &= wayland_platform_destroy(self->native);
+ break;
case WAFFLE_PLATFORM_X11_EGL:
ok &= xegl_platform_destroy(self->native);
break;