From 94bf657b2390a1cb72d748047e5c7014e4bc1752 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 3 Nov 2010 15:22:36 +0800 Subject: 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. --- src/gallium/state_trackers/egl/common/native.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers/egl/common') 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 { @@ -78,6 +88,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 -- cgit v1.2.3