[PATCH weston 03/10] gl-renderer: move all EGL_PLATFORM_* defines here
Jonny Lamb
jonny.lamb at collabora.co.uk
Tue Mar 24 05:12:02 PDT 2015
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
src/compositor-drm.c | 4 ----
src/compositor-wayland.c | 4 ----
src/compositor-x11.c | 4 ----
src/gl-renderer.h | 12 ++++++++++++
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 8471a35..158929f 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -68,10 +68,6 @@
#define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64
#endif
-#ifndef EGL_PLATFORM_GBM_KHR
-#define EGL_PLATFORM_GBM_KHR 0x31D7
-#endif
-
static int option_current_mode = 0;
enum output_config {
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 84c8731..9b851b7 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -47,10 +47,6 @@
#define WINDOW_TITLE "Weston Compositor"
-#ifndef EGL_PLATFORM_WAYLAND_KHR
-#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
-#endif
-
struct wayland_compositor {
struct weston_compositor base;
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index fd914d7..3ef446c 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -55,10 +55,6 @@
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
-#ifndef EGL_PLATFORM_X11_KHR
-#define EGL_PLATFORM_X11_KHR 0x31D5
-#endif
-
static int option_width;
static int option_height;
static int option_scale;
diff --git a/src/gl-renderer.h b/src/gl-renderer.h
index 9e4b220..2434fdd 100644
--- a/src/gl-renderer.h
+++ b/src/gl-renderer.h
@@ -39,6 +39,18 @@ typedef intptr_t EGLNativeDisplayType;
typedef intptr_t EGLNativeWindowType;
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
+#endif /* ENABLE_EGL */
+
+#ifndef EGL_PLATFORM_GBM_KHR
+#define EGL_PLATFORM_GBM_KHR 0x31D7
+#endif
+
+#ifndef EGL_PLATFORM_WAYLAND_KHR
+#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
+#endif
+
+#ifndef EGL_PLATFORM_X11_KHR
+#define EGL_PLATFORM_X11_KHR 0x31D5
#endif
enum gl_renderer_border_side {
--
2.1.4
More information about the wayland-devel
mailing list