+/**
+ * The driver portion of EGL_KHR_mutable_render_buffer.
+ *
+ * If the driver creates a __DRIconfig with
+ * __DRI_ATTRIB_MUTABLE_RENDER_BUFFER, then it must support this extension.
+ *
+ * To support this extension:
+ *
+ * - The driver should create at least one __DRIconfig with
+ * __DRI_ATTRIB_MUTABLE_RENDER_BUFFER. This is strongly recommended but
+ * not required.
+ *
+ * - The driver must be able to handle __DRI_IMAGE_BUFFER_SHARED if
+ * returned by __DRIimageLoaderExtension:getBuffers().
+ *
+ * - When rendering to __DRI_IMAGE_BUFFER_SHARED, it must call
+ * __DRImutableRenderBufferLoaderExtension::displaySharedBuffer() in
+ * response to glFlush and glFinish. (This requirement is not documented
+ * in EGL_KHR_mutable_render_buffer, but is a de-facto requirement in the
+ * Android ecosystem. Android applications expect that glFlush will
+ * immediately display the buffer when in shared buffer mode, and Android
+ * drivers comply with this expectation). It :may: call
+ * displaySharedBuffer() more often than required.
+ *
+ * - When rendering to __DRI_IMAGE_BUFFER_SHARED, it must ensure that the
+ * buffer is always in a format compatible for display because the
+ * display engine (usually SurfaceFlinger or hwcomposer) may display the
+ * image at any time, even concurrently with 3D rendering. For example,
+ * display hardware and the GL hardware may be able to access the buffer
+ * simultaneously. In particular, if the buffer is compressed then take
+ * care that SurfaceFlinger and hwcomposer can consume the compression
+ * format.
+ *
+ * \see __DRI_IMAGE_BUFFER_SHARED
+ * \see __DRI_ATTRIB_MUTABLE_RENDER_BUFFER
+ * \see __DRI_MUTABLE_RENDER_BUFFER_LOADER
+ */
+#define __DRI_MUTABLE_RENDER_BUFFER_DRIVER "DRI_MutableRenderBufferDriver"
+#define __DRI_MUTABLE_RENDER_BUFFER_DRIVER_VERSION 1
+
+typedef struct __DRImutableRenderBufferDriverExtensionRec __DRImutableRenderBufferDriverExtension;
+struct __DRImutableRenderBufferDriverExtensionRec {
+ __DRIextension base;
+};
+
+/**
+ * The loader portion of EGL_KHR_mutable_render_buffer.
+ *
+ * Requires loader extension DRI_IMAGE_LOADER, through which the loader sends
+ * __DRI_IMAGE_BUFFER_SHARED to the driver.
+ *
+ * \see __DRI_MUTABLE_RENDER_BUFFER_DRIVER
+ */
+#define __DRI_MUTABLE_RENDER_BUFFER_LOADER "DRI_MutableRenderBufferLoader"
+#define __DRI_MUTABLE_RENDER_BUFFER_LOADER_VERSION 1
+
+typedef struct __DRImutableRenderBufferLoaderExtensionRec __DRImutableRenderBufferLoaderExtension;
+struct __DRImutableRenderBufferLoaderExtensionRec {
+ __DRIextension base;
+
+ /**
+ * Inform the display engine (that is, SurfaceFlinger and/or hwcomposer)
+ * that the __DRIdrawable has new content.
+ *
+ * The display engine may ignore this call, for example, if it continually
+ * refreshes and displays the buffer on every frame, as in
+ * EGL_ANDROID_front_buffer_auto_refresh. On the other extreme, the display
+ * engine may refresh and display the buffer only in frames in which the
+ * driver calls this.
+ *
+ * If the fence_fd is not -1, then the display engine will display the
+ * buffer only after the fence signals.
+ *
+ * The drawable's current __DRIimageBufferMask, as returned by
+ * __DRIimageLoaderExtension::getBuffers(), must be
+ * __DRI_IMAGE_BUFFER_SHARED.
+ */
+ void (*displaySharedBuffer)(__DRIdrawable *drawable, int fence_fd,
+ void *loaderPrivate);
+};
+