egl: add _EGL_PLATFORM_ANDROID
authorChia-I Wu <olv@lunarg.com>
Mon, 11 Oct 2010 08:09:52 +0000 (16:09 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 20 Aug 2011 18:01:48 +0000 (02:01 +0800)
This is Android Gingerbread platform.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
include/EGL/eglplatform.h
src/egl/main/egldisplay.c
src/egl/main/egldisplay.h

index fbfdce32ef45cb28656afa45e5d5eee0812cc2b8..8d3f72f24b308458872b13e6cbae8ccaaf5dd98b 100644 (file)
@@ -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
index 512ad503f358c42f4c44e475e26d58dc9c35ee78..1d05e57c4296c33ed0822c5fd8aa3b6af12b53f3 100644 (file)
@@ -72,7 +72,8 @@ static const struct {
    { _EGL_PLATFORM_X11, "x11" },
    { _EGL_PLATFORM_WAYLAND, "wayland" },
    { _EGL_PLATFORM_DRM, "drm" },
-   { _EGL_PLATFORM_FBDEV, "fbdev" }
+   { _EGL_PLATFORM_FBDEV, "fbdev" },
+   { _EGL_PLATFORM_ANDROID, "android" }
 };
 
 
index 05335ada63cf2509cf93c6d7f5b997a0ca0cf5c8..f0815d028dfc4455f1e6dd7e74d1f0635c940b7e 100644 (file)
@@ -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