diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-30 18:46:48 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-30 18:46:48 -0700 |
commit | fa170f513338322102a200de7d1fd696e51d55c8 (patch) | |
tree | c4b7c19f4b78cf2e8805b675e25dc4dd99e227eb /include/ui | |
parent | b6db63a126967bb533966bfa946d963ad90d69a7 (diff) | |
parent | cb6b9041647b4f080324742eee5ce709960ff610 (diff) | |
download | frameworks_native-fa170f513338322102a200de7d1fd696e51d55c8.zip frameworks_native-fa170f513338322102a200de7d1fd696e51d55c8.tar.gz frameworks_native-fa170f513338322102a200de7d1fd696e51d55c8.tar.bz2 |
Merge change 9287
* changes:
fixed some issues with the software renderer when surfaces are made current.
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/FramebufferNativeWindow.h | 1 | ||||
-rw-r--r-- | include/ui/Surface.h | 6 | ||||
-rw-r--r-- | include/ui/egl/android_natives.h | 15 |
3 files changed, 21 insertions, 1 deletions
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h index e72357a..cb9bf94 100644 --- a/include/ui/FramebufferNativeWindow.h +++ b/include/ui/FramebufferNativeWindow.h @@ -62,6 +62,7 @@ private: static int dequeueBuffer(android_native_window_t* window, android_native_buffer_t** buffer); static int lockBuffer(android_native_window_t* window, android_native_buffer_t* buffer); static int queueBuffer(android_native_window_t* window, android_native_buffer_t* buffer); + static int query(android_native_window_t* window, int what, int* value); framebuffer_device_t* fbDev; alloc_device_t* grDev; diff --git a/include/ui/Surface.h b/include/ui/Surface.h index 8c4f63d..156d453 100644 --- a/include/ui/Surface.h +++ b/include/ui/Surface.h @@ -115,6 +115,8 @@ private: sp<ISurface> mSurface; SurfaceID mToken; uint32_t mIdentity; + uint32_t mWidth; + uint32_t mHeight; PixelFormat mFormat; uint32_t mFlags; mutable Mutex mLock; @@ -192,10 +194,12 @@ private: static int dequeueBuffer(android_native_window_t* window, android_native_buffer_t** buffer); static int lockBuffer(android_native_window_t* window, android_native_buffer_t* buffer); static int queueBuffer(android_native_window_t* window, android_native_buffer_t* buffer); + static int query(android_native_window_t* window, int what, int* value); int dequeueBuffer(android_native_buffer_t** buffer); int lockBuffer(android_native_buffer_t* buffer); int queueBuffer(android_native_buffer_t* buffer); + int query(int what, int* value); status_t dequeueBuffer(sp<SurfaceBuffer>* buffer); status_t lockBuffer(const sp<SurfaceBuffer>& buffer); @@ -209,6 +213,8 @@ private: sp<SurfaceBuffer> mLockedBuffer; SurfaceID mToken; uint32_t mIdentity; + uint32_t mWidth; + uint32_t mHeight; PixelFormat mFormat; uint32_t mFlags; mutable Region mDirtyRegion; diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h index 0398ea7..a3a1316 100644 --- a/include/ui/egl/android_natives.h +++ b/include/ui/egl/android_natives.h @@ -60,6 +60,12 @@ struct android_native_base_t // --------------------------------------------------------------------------- +/* attributes queriable with query() */ +enum { + NATIVE_WINDOW_WIDTH = 0, + NATIVE_WINDOW_HEIGHT = 1 +}; + struct android_native_window_t { #ifdef __cplusplus @@ -129,8 +135,15 @@ struct android_native_window_t int (*queueBuffer)(struct android_native_window_t* window, struct android_native_buffer_t* buffer); + /* + * hook used to retrieve information about the native window. + * + * Returns 0 on success or -errno on error. + */ + int (*query)(struct android_native_window_t* window, + int what, int* value); - void* reserved_proc[5]; + void* reserved_proc[4]; }; // --------------------------------------------------------------------------- |