diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-10-11 16:09:52 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2011-08-05 15:29:58 +0900 |
commit | a8720699efad7331423491101f2f332588639c3f (patch) | |
tree | 24a9d55f9731224da0596877771200c04b2815a8 | |
parent | 5a1e98f28329cdc32cb718c36082676936058c91 (diff) |
egl: add _EGL_PLATFORM_ANDROID
This is Android Gingerbread platform.
-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 fbfdce32ef..9c8b857487 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -90,6 +90,15 @@ typedef struct gbm_device *EGLNativeDisplayType; typedef struct gbm_bo *EGLNativePixmapType; typedef void *EGLNativeWindowType; +#elif defined(ANDROID) /* Android */ + +struct ANativeWindow; +struct egl_native_pixmap_t; + +typedef struct ANativeWindow* 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 60f3177727..5b8d45cff9 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -59,7 +59,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 9cd4dbfcc8..1279c71d51 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -44,6 +44,7 @@ enum _egl_platform_type { _EGL_PLATFORM_WAYLAND, _EGL_PLATFORM_DRM, _EGL_PLATFORM_FBDEV, + _EGL_PLATFORM_ANDROID, _EGL_NUM_PLATFORMS, _EGL_INVALID_PLATFORM = -1 |