diff options
author | Mathias Agopian <mathias@google.com> | 2010-05-21 17:24:35 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-05-24 18:26:01 -0700 |
commit | 2be352adab7f11646fda7c0240e496bbb37f7bd1 (patch) | |
tree | e7a168546a256cd4f7c57261690796cf527ae8a2 /include/ui/egl/android_natives.h | |
parent | 57d89899c9fb978a1c097f298aa94c5db1f61bb6 (diff) | |
download | frameworks_base-2be352adab7f11646fda7c0240e496bbb37f7bd1.zip frameworks_base-2be352adab7f11646fda7c0240e496bbb37f7bd1.tar.gz frameworks_base-2be352adab7f11646fda7c0240e496bbb37f7bd1.tar.bz2 |
added the notion of fixed-size buffers
the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.
Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
Diffstat (limited to 'include/ui/egl/android_natives.h')
-rw-r--r-- | include/ui/egl/android_natives.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h index b44901f..171f3df 100644 --- a/include/ui/egl/android_natives.h +++ b/include/ui/egl/android_natives.h @@ -82,6 +82,7 @@ enum { NATIVE_WINDOW_DISCONNECT, NATIVE_WINDOW_SET_CROP, NATIVE_WINDOW_SET_BUFFER_COUNT, + NATIVE_WINDOW_SET_BUFFERS_GEOMETRY, }; /* parameter for NATIVE_WINDOW_[DIS]CONNECT */ @@ -192,6 +193,7 @@ typedef struct android_native_window_t * NATIVE_WINDOW_DISCONNECT * NATIVE_WINDOW_SET_CROP * NATIVE_WINDOW_SET_BUFFER_COUNT + * NATIVE_WINDOW_SET_BUFFERS_GEOMETRY * */ @@ -273,6 +275,25 @@ static inline int native_window_set_buffer_count( return window->perform(window, NATIVE_WINDOW_SET_BUFFER_COUNT, bufferCount); } +/* + * native_window_set_buffers_geometry(..., int w, int h, int format) + * All buffers dequeued after this call will have the geometry specified. + * In particular, all buffers will have a fixed-size, independent form the + * native-window size. They will be appropriately scaled to the window-size + * upon composition. + * + * If all parameters are 0, the normal behavior is restored. That is, + * dequeued buffers following this call will be sized to the window's size. + * + */ +static inline int native_window_set_buffers_geometry( + android_native_window_t* window, + int w, int h, int format) +{ + return window->perform(window, NATIVE_WINDOW_SET_BUFFERS_GEOMETRY, + w, h, format); +} + // --------------------------------------------------------------------------- /* FIXME: this is legacy for pixmaps */ |