summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-08-08 10:07:03 -0400
committerKristian Høgsberg <krh@redhat.com>2007-10-12 16:19:19 -0400
commit2b0847c7aaf95b6b10f062dfff601032b2430a9b (patch)
treed384657bd45c0e816fc7cda51a674fa693d865bd /GL
parent600028305cc047e824b18369a026f89c9eb7e437 (diff)
Implement damage reporting for AIGLX.
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/glxdri.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 6389ad97c..ae743113b 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -784,6 +784,22 @@ getUST(int64_t *ust)
}
}
+static void __glXReportDamage(__DRIdrawable *driDraw,
+ int x, int y,
+ drm_clip_rect_t *rects, int num_rects,
+ GLboolean front_buffer)
+{
+ __GLXDRIdrawable *drawable =
+ containerOf(driDraw, __GLXDRIdrawable, driDrawable);
+ DrawablePtr pDraw = drawable->base.pDraw;
+ RegionRec region;
+
+ REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, num_rects);
+ REGION_TRANSLATE(pScreen, &region, pDraw->x, pDraw->y);
+ DamageDamageRegion(pDraw, &region);
+ REGION_UNINIT(pDraw->pScreen, &region);
+}
+
/* Table of functions that we export to the driver. */
static const __DRIinterfaceMethods interface_methods = {
_gl_context_modes_create,
@@ -793,6 +809,8 @@ static const __DRIinterfaceMethods interface_methods = {
getUST,
NULL, /* glXGetMscRateOML, */
+
+ __glXReportDamage,
};
static const char dri_driver_path[] = DRI_DRIVER_PATH;