[Mesa-dev] [PATCH 06/18] egl: add _EGL_PLATFORM_ANDROID
Chia-I Wu
olvaffe at gmail.com
Tue Aug 16 23:28:09 PDT 2011
From: Chia-I Wu <olv at lunarg.com>
This is Android Gingerbread platform.
---
include/EGL/eglplatform.h | 9 +++++++++
src/egl/main/egldisplay.c | 3 ++-
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 fbfdce3..9c8b857 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 512ad50..1d05e57 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -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" }
};
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index 05335ad..f0815d0 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
--
1.7.5.4
More information about the mesa-dev
mailing list