summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-10-11 16:09:52 +0800
committerChia-I Wu <olvaffe@gmail.com>2011-03-16 20:18:39 +0800
commitf9172081caa67d1894af91220c776648f88ddbd2 (patch)
tree08abff7679f08ca5dd36ecf78898e4ec3c6d9828
parentcb4afed922c68edc80300ef24f5a08ad4ffe108d (diff)
android: Add _EGL_PLATFORM_ANDROID.
-rw-r--r--include/EGL/eglplatform.h9
-rw-r--r--src/egl/main/egldisplay.c3
-rw-r--r--src/egl/main/egldisplay.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
index 005b294..1c416c6 100644
--- a/include/EGL/eglplatform.h
+++ b/include/EGL/eglplatform.h
@@ -84,6 +84,15 @@ typedef struct wl_egl_display *EGLNativeDisplayType;
typedef struct wl_egl_pixmap *EGLNativePixmapType;
typedef struct wl_egl_window *EGLNativeWindowType;
+#elif defined(ANDROID) /* Android */
+
+struct android_native_window_t;
+struct egl_native_pixmap_t;
+
+typedef struct android_native_window_t* EGLNativeWindowType;
+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
+typedef void* EGLNativeDisplayType;
+
#elif defined(__unix__) || defined(__unix)
#ifdef MESA_EGL_NO_X11_HEADERS
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 3059294..bc4afd1 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -29,7 +29,8 @@ _eglGetNativePlatformFromEnv(void)
{ _EGL_PLATFORM_X11, "x11" },
{ _EGL_PLATFORM_WAYLAND, "wayland" },
{ _EGL_PLATFORM_DRM, "drm" },
- { _EGL_PLATFORM_FBDEV, "fbdev" }
+ { _EGL_PLATFORM_FBDEV, "fbdev" },
+ { _EGL_PLATFORM_ANDROID, "android" }
};
_EGLPlatformType plat = _EGL_INVALID_PLATFORM;
const char *plat_name;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 97ae2b0..b1547e4 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -14,6 +14,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_WAYLAND,
_EGL_PLATFORM_DRM,
_EGL_PLATFORM_FBDEV,
+ _EGL_PLATFORM_ANDROID,
_EGL_NUM_PLATFORMS,
_EGL_INVALID_PLATFORM = -1