summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/g3dvl/dri/driclient.c
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2010-06-06 11:48:47 -0400
committerYounes Manton <[email protected]>2010-06-06 12:19:22 -0400
commit6414952efe3b53fd33d73d592da74975a1075330 (patch)
treeb4dd6a7002487d7c99d308d0e391db2b65b7cdc0 /src/gallium/winsys/g3dvl/dri/driclient.c
parent156fbb9fc530cd2a1d57dc516f67e720ce7f2238 (diff)
vl: Drop DRI1, clean up DRI2 bits.
Diffstat (limited to 'src/gallium/winsys/g3dvl/dri/driclient.c')
-rw-r--r--src/gallium/winsys/g3dvl/dri/driclient.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/winsys/g3dvl/dri/driclient.c b/src/gallium/winsys/g3dvl/dri/driclient.c
index 7a2469c0d66..90e48a7cb28 100644
--- a/src/gallium/winsys/g3dvl/dri/driclient.c
+++ b/src/gallium/winsys/g3dvl/dri/driclient.c
@@ -353,17 +353,36 @@ free_screen:
int dri2DestroyScreen(dri_screen_t *dri_screen)
{
/* Not much to do here apparently... */
+ assert(dri_screen);
+ free(dri_screen);
return 0;
}
int dri2CreateDrawable(dri_screen_t *dri_screen, XID drawable)
{
+ assert(dri_screen);
DRI2CreateDrawable(dri_screen->display, drawable);
return 0;
}
int dri2DestroyDrawable(dri_screen_t *dri_screen, XID drawable)
{
+ assert(dri_screen);
DRI2DestroyDrawable(dri_screen->display, drawable);
return 0;
}
+
+int dri2CopyDrawable(dri_screen_t *dri_screen, XID drawable, int dest, int src)
+{
+ XserverRegion region;
+
+ assert(dri_screen);
+ assert(dest >= DRI_BUFFER_FRONT_LEFT && dest <= DRI_BUFFER_DEPTH_STENCIL);
+ assert(src >= DRI_BUFFER_FRONT_LEFT && src <= DRI_BUFFER_DEPTH_STENCIL);
+
+ region = XFixesCreateRegionFromWindow(dri_screen->display, drawable, WindowRegionBounding);
+ DRI2CopyRegion(dri_screen->display, drawable, region, dest, src);
+ XFixesDestroyRegion(dri_screen->display, region);
+
+ return 0;
+}