diff options
author | Chia-I Wu <[email protected]> | 2010-11-03 15:22:36 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-11-03 16:04:59 +0800 |
commit | 94bf657b2390a1cb72d748047e5c7014e4bc1752 (patch) | |
tree | 3b204d554ccec7b2406a58bab74bf2494c661f2f /src/gallium/state_trackers/egl/common/native.h | |
parent | c9186bd5886f4e05fd62a98d42404eda2a99416c (diff) |
st/egl: Add native_surface::present callback.
The callback presents the given attachment to the native engine. It
allows the swap behavior and interval to be controlled. It will replace
native_surface::flush_frontbuffer and native_surface::swap_buffers
shortly.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/native.h')
-rw-r--r-- | src/gallium/state_trackers/egl/common/native.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index 3c3f57e2670..446c6b45a92 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -54,7 +54,17 @@ enum native_param_type { * Return TRUE if window/pixmap surfaces use the buffers of the native * types. */ - NATIVE_PARAM_USE_NATIVE_BUFFER + NATIVE_PARAM_USE_NATIVE_BUFFER, + + /** + * Return TRUE if native_surface::present can preserve the buffer. + */ + NATIVE_PARAM_PRESERVE_BUFFER, + + /** + * Return the maximum supported swap interval. + */ + NATIVE_PARAM_MAX_SWAP_INTERVAL }; struct native_surface { @@ -79,6 +89,14 @@ struct native_surface { boolean (*flush_frontbuffer)(struct native_surface *nsurf); /** + * Present the given buffer to the native engine. + */ + boolean (*present)(struct native_surface *nsurf, + enum native_attachment natt, + boolean preserve, + uint swap_interval); + + /** * Validate the buffers of the surface. textures, if not NULL, points to an * array of size NUM_NATIVE_ATTACHMENTS and the returned textures are owned * by the caller. A sequence number is also returned. The caller can use |