diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-06-30 13:56:17 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-06-30 15:32:04 -0700 |
commit | 8b49bd1a2f8117e1c22884f0150e72cbcf838f32 (patch) | |
tree | ec6e43ed118268b09cbb61c8eed02c757e9602ed /opengl | |
parent | 3c80a4a044865bdf1289c7896baffa1c082d835c (diff) | |
download | frameworks_base-8b49bd1a2f8117e1c22884f0150e72cbcf838f32.zip frameworks_base-8b49bd1a2f8117e1c22884f0150e72cbcf838f32.tar.gz frameworks_base-8b49bd1a2f8117e1c22884f0150e72cbcf838f32.tar.bz2 |
Introduce official public NativeWindow type.
Not yet hooked up to anything in the NDK, but requires renaming
the existing android_native_window_t type everywhere.
Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/include/EGL/eglplatform.h | 5 | ||||
-rw-r--r-- | opengl/libagl/egl.cpp | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h index a2c6a7d..25d7697 100644 --- a/opengl/include/EGL/eglplatform.h +++ b/opengl/include/EGL/eglplatform.h @@ -91,10 +91,11 @@ typedef Window EGLNativeWindowType; #elif defined(ANDROID) -struct android_native_window_t; +#include <android/native_window.h> + struct egl_native_pixmap_t; -typedef struct android_native_window_t* EGLNativeWindowType; +typedef struct ANativeWindow* EGLNativeWindowType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef void* EGLNativeDisplayType; diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index 7cb01d0..54d7307 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -213,7 +213,7 @@ struct egl_window_surface_v2_t : public egl_surface_t egl_window_surface_v2_t( EGLDisplay dpy, EGLConfig config, int32_t depthFormat, - android_native_window_t* window); + ANativeWindow* window); ~egl_window_surface_v2_t(); @@ -235,7 +235,7 @@ struct egl_window_surface_v2_t : public egl_surface_t private: status_t lock(android_native_buffer_t* buf, int usage, void** vaddr); status_t unlock(android_native_buffer_t* buf); - android_native_window_t* nativeWindow; + ANativeWindow* nativeWindow; android_native_buffer_t* buffer; android_native_buffer_t* previousBuffer; gralloc_module_t const* module; @@ -355,7 +355,7 @@ private: egl_window_surface_v2_t::egl_window_surface_v2_t(EGLDisplay dpy, EGLConfig config, int32_t depthFormat, - android_native_window_t* window) + ANativeWindow* window) : egl_surface_t(dpy, config, depthFormat), nativeWindow(window), buffer(0), previousBuffer(0), module(0), blitengine(0), bits(NULL) @@ -1300,7 +1300,7 @@ static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config, if (!(surfaceType & EGL_WINDOW_BIT)) return setError(EGL_BAD_MATCH, EGL_NO_SURFACE); - if (static_cast<android_native_window_t*>(window)->common.magic != + if (static_cast<ANativeWindow*>(window)->common.magic != ANDROID_NATIVE_WINDOW_MAGIC) { return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); } @@ -1323,7 +1323,7 @@ static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config, egl_surface_t* surface; surface = new egl_window_surface_v2_t(dpy, config, depthFormat, - static_cast<android_native_window_t*>(window)); + static_cast<ANativeWindow*>(window)); if (!surface->initCheck()) { // there was a problem in the ctor, the error |