[Mesa-dev] [PATCH 06/18] egl: add _EGL_PLATFORM_ANDROID
Chia-I Wu
olvaffe at gmail.com
Wed Aug 17 20:07:43 PDT 2011
On Thu, Aug 18, 2011 at 12:34 AM, Chad Versace <chad at chad-versace.us> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/16/2011 11:28 PM, Chia-I Wu wrote:
>> 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; +
>
> The dominant style throught the EGL headers is to place the * like this:
> typedef struct ANativeWindow *EGLNativeWindowType;
> typedef struct egl_native_pixmap_t *EGLNativePixmapType;
> typedef void *EGLNativeDisplayType;
I copied them from frameworks/base/opengl/include/EGL/eglplatform.h.
But you are right. Will fix.
> Otherwise, this is
> Reviewed-by: Chad Versace <chad at chad-versace.us>
>
>> #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
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJOS+1/AAoJEAIvNt057x8iv6wP/iGAPhNsNTVesriWAMCJGzX5
> Bnp5D+eJoMLh8b1+SL//H9eYCnTyue6GhxAhy9gfZc56R0Fv4ezo1H6Mb5DbJoh5
> GpkLxokPBP+PGyCMqK+B0yFLJP1FQt8PVFQIdiy2+DDnGDWNTV86NCS3Z3MoKhP2
> 4gtGSyGdJQoYZ2SKpckRQqxMXMgxgVcojBSrlES3jodsj/OnLP4EJ9y5Q6slCvY/
> eX9dzYqwBbzKd2dtjMW5RIMhKRC0Fv+Is28YNb7+7t59sBailhKwxIOizAigAMKk
> E7eC/9aR023RjdrjT+RFLbPqZvYCCeeI34F3nqgPSi/YYENZgDazmjyTH/uCycLk
> 01hlAU9c3kxcCrAk8m1prAbJPy2yHyBP8LmQUl4uAfDPq+GlA9BLtRWphelr9qy5
> pElmgzQZcZLou9cB9w/sYHBUl38fMvCsGDXFC+91/Ag89r9pMrcOok3DDI+3jOod
> e3cIM36rx2JGx+j8OvOOWmBjdIF6BdJpizc+tDDYvnHlcriT0IqFfgx/guTgcg8f
> MKc4UL/t9pr+yuEcG+XQwSOPBhor+DO/VyEm7glug1VkmoxvUTFAwekRMMnbKb4c
> DRgin7qbxx91vx97zBecC+3Qi58n42IukKm4JE/CTc6tB0kHTZa4d3XBa7DXmfRP
> Tu/OyWoplDMpv/GKiJY1
> =m/iR
> -----END PGP SIGNATURE-----
>
--
olv at LunarG.com
More information about the mesa-dev
mailing list