[pkg-fso-commits] [SCM] xf86-video-glamo, SMedia Glamo video driver for X.Org branch, master, updated. upstream/0.0.0+20090707.git98c012f7-57-g9918e08
Thomas White
taw at bitwiz.org.uk
Fri Jan 8 13:25:08 UTC 2010
The following commit has been merged in the master branch:
commit bcbc3c57103d5455eea42a47b2067edfa1febdc2
Author: Thomas White <taw at bitwiz.org.uk>
Date: Sat Sep 19 14:06:40 2009 +0100
Implement glamoCopyRegion()
diff --git a/src/glamo-dri2.c b/src/glamo-dri2.c
index 3ac2381..c607835 100644
--- a/src/glamo-dri2.c
+++ b/src/glamo-dri2.c
@@ -271,9 +271,56 @@ static void glamoDestroyBuffers(DrawablePtr pDraw,
#endif
-static void glamoCopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
- DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer)
+static void glamoCopyRegion(DrawablePtr drawable, RegionPtr region,
+ DRI2BufferPtr dst_buffer, DRI2BufferPtr src_buffer)
{
+ struct glamo_dri2_buffer_priv *src_private;
+ struct glamo_dri2_buffer_priv *dst_private;
+ ScreenPtr pScreen = drawable->pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ PixmapPtr src_pixmap;
+ PixmapPtr dst_pixmap;
+ RegionPtr copy_clip;
+ GCPtr gc;
+ char *s, *d;
+
+ src_private = src_buffer->driverPrivate;
+ dst_private = dst_buffer->driverPrivate;
+ src_pixmap = src_private->pixmap;
+ dst_pixmap = dst_private->pixmap;
+
+ switch (src_private->attachment) {
+ case DRI2BufferFrontLeft : s = "DRI2 front left"; break;
+ case DRI2BufferFakeFrontLeft : s = "DRI2 fake front left"; break;
+ case DRI2BufferBackLeft : s = "DRI2 back left"; break;
+ default : s = "unknown"; break;
+ }
+ switch (dst_private->attachment) {
+ case DRI2BufferFrontLeft : d = "DRI2 front left"; break;
+ case DRI2BufferFakeFrontLeft : d = "DRI2 fake front left"; break;
+ case DRI2BufferBackLeft : d = "DRI2 back left"; break;
+ default : d = "unknown"; break;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamoCopyRegion"
+ " %s (%i) -> %s (%i)\n",
+ s, src_private->attachment,
+ d, dst_private->attachment);
+
+ if (src_private->attachment == DRI2BufferFrontLeft) {
+ src_pixmap = (PixmapPtr)drawable;
+ }
+ if (dst_private->attachment == DRI2BufferFrontLeft) {
+ dst_pixmap = (PixmapPtr)drawable;
+ }
+
+ gc = GetScratchGC(drawable->depth, pScreen);
+ copy_clip = REGION_CREATE(pScreen, NULL, 0);
+ REGION_COPY(pScreen, copy_clip, region);
+ gc->funcs->ChangeClip(gc, CT_REGION, copy_clip, 0);
+ ValidateGC(&dst_pixmap->drawable, gc);
+ gc->ops->CopyArea(&src_pixmap->drawable, &dst_pixmap->drawable, gc,
+ 0, 0, drawable->width, drawable->height, 0, 0);
+ FreeScratchGC(gc);
}
--
xf86-video-glamo, SMedia Glamo video driver for X.Org
More information about the pkg-fso-commits
mailing list