aboutsummaryrefslogtreecommitdiffstats
path: root/include/GL/internal/dri_interface.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-01-05 18:19:58 -0800
committerEric Anholt <[email protected]>2007-01-05 18:23:57 -0800
commitc2b185cff82a6cdb723cda4e05ffe1a213a9de3e (patch)
treebdaa0ae2352ed0c1b53fdacfc449e1c392e45744 /include/GL/internal/dri_interface.h
parentb530d96216f8a01e2dd4100941f6b1aa4d9dfbcd (diff)
Add reporting of damage by DRI drivers when the extension support is available.
With this, tools like ximagesrc in gstreamer correctly see updates from GL rendering. Support requires that the Xdamage library be current (but will be disabled if not present) plus a new X Server with support for the new XDamagePost request. libGL now has a new interface version, and also links against libXdamage and libXfixes to support it, but backwards compatibility is retained. Currently, all drivers report damage at SwapBuffers time through common code -- front buffer rendering doesn't result in damage being reported. Also, the damage is against the root window, as our drivers don't yet render to backing store when they should (composited environments).
Diffstat (limited to 'include/GL/internal/dri_interface.h')
-rw-r--r--include/GL/internal/dri_interface.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index c204ecfe622..a3de2c6aab3 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -237,6 +237,26 @@ struct __DRIinterfaceMethodsRec {
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
/*@}*/
+
+ /**
+ * Reports areas of the given drawable which have been modified by the
+ * driver.
+ *
+ * \param drawable which the drawing was done to.
+ * \param rects rectangles affected, with the drawable origin as the
+ * origin.
+ * \param x X offset of the drawable within the screen (used in the
+ * front_buffer case)
+ * \param y Y offset of the drawable within the screen.
+ * \param front_buffer boolean flag for whether the drawing to the
+ * drawable was actually done directly to the front buffer (instead
+ * of backing storage, for example)
+ */
+ void (*reportDamage)(__DRInativeDisplay * dpy, int screen,
+ __DRIid drawable,
+ int x, int y,
+ drm_clip_rect_t *rects, int num_rects,
+ int front_buffer);
};