duplicateImage will allow you to create a linear or sRGB view into a DRIimage you have access to. This is useful because compositors may want a specific view which doesn't correspond to the one used by applications. --- include/GL/internal/dri_interface.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index d028d05..17af117 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1005,7 +1005,7 @@ struct __DRIdri2ExtensionRec { * extensions. */ #define __DRI_IMAGE "DRI_IMAGE" -#define __DRI_IMAGE_VERSION 8 +#define __DRI_IMAGE_VERSION 9 /** * These formats correspond to the similarly named MESA_FORMAT_* @@ -1081,6 +1081,15 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_COMPONENTS_Y_UV 0x3004 #define __DRI_IMAGE_COMPONENTS_Y_XUXV 0x3005 +/** + * Flags for duplicateImage. + * + * \since 9 + */ + +#define __DRI_IMAGE_FLAG_SRGB_VIEW 0x0001 +#define __DRI_IMAGE_FLAG_LINEAR_VIEW 0x0002 + /** * queryImage attributes @@ -1239,6 +1248,15 @@ struct __DRIimageExtensionRec { enum __DRIChromaSiting vert_siting, unsigned *error, void *loaderPrivate); + + /** + * The new __DRIimage will share the raw content with the old one, + * but it might have a different format. + * + * \since 9 + */ + __DRIimage *(*duplicateImage)(__DRIscreen *screen, __DRIimage *image, + unsigned int flags, void *loaderPrivate); }; -- 1.9.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev