diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-10-11 16:09:52 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2011-03-16 20:18:39 +0800 |
commit | f9172081caa67d1894af91220c776648f88ddbd2 (patch) | |
tree | 08abff7679f08ca5dd36ecf78898e4ec3c6d9828 | |
parent | cb4afed922c68edc80300ef24f5a08ad4ffe108d (diff) |
android: Add _EGL_PLATFORM_ANDROID.
-rw-r--r-- | include/EGL/eglplatform.h | 9 | ||||
-rw-r--r-- | src/egl/main/egldisplay.c | 3 | ||||
-rw-r--r-- | src/egl/main/egldisplay.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index 005b294440..1c416c6edd 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 3059294729..bc4afd183f 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 97ae2b01ba..b1547e42d4 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 |