Implement damage reporting for AIGLX.

This commit is contained in:
Kristian Høgsberg 2007-08-08 10:07:03 -04:00
parent 600028305c
commit 2b0847c7aa

View File

@ -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;