[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:24:49 UTC 2010
The following commit has been merged in the master branch:
commit a7c514dad30ab7fe7d684ed1e8ccb6df100edc1c
Author: Thomas White <taw at bitwiz.org.uk>
Date: Fri Aug 21 00:50:05 2009 +0100
Handle the new DRI protocol as well
diff --git a/src/glamo-dri2.c b/src/glamo-dri2.c
index 4186bfa..ae62ef4 100644
--- a/src/glamo-dri2.c
+++ b/src/glamo-dri2.c
@@ -57,8 +57,20 @@ typedef struct {
} GlamoDRI2BufferPrivateRec, *GlamoDRI2BufferPrivatePtr;
-static DRI2BufferPtr glamoCreateBuffers(DrawablePtr pDraw,
- unsigned int *attachments, int count)
+#ifdef USE_DRI2_1_1_0
+
+static DRI2BufferPtr glamoCreateBuffer(DrawablePtr pDraw,
+ unsigned int attachment,
+ unsigned int format)
+{
+ DRI2BufferPtr buffer;
+ return buffer;
+}
+
+#else
+
+static DRI2BufferPtr glamoCreateBuffer(DrawablePtr pDraw,
+ unsigned int *attachments, int count)
{
ScreenPtr pScreen = pDraw->pScreen;
DRI2BufferPtr buffers;
@@ -115,6 +127,26 @@ static DRI2BufferPtr glamoCreateBuffers(DrawablePtr pDraw,
return buffers;
}
+#endif
+
+#ifdef USE_DRI2_1_1_0
+
+static void glamoDestroyBuffer(DrawablePtr pDraw,
+ DRI2BufferPtr buffer)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ int i;
+ GlamoDRI2BufferPrivatePtr private;
+
+ private = buffer.driverPrivate;
+ (*pScreen->DestroyPixmap)(private->pPixmap);
+
+ if ( buffer ) {
+ xfree(buffer.driverPrivate);
+ }
+}
+
+#else
static void glamoDestroyBuffers(DrawablePtr pDraw,
DRI2BufferPtr buffers, int count)
@@ -134,6 +166,8 @@ static void glamoDestroyBuffers(DrawablePtr pDraw,
}
}
+#endif
+
static void glamoCopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer)
@@ -171,8 +205,13 @@ void driScreenInit(ScreenPtr pScreen)
dri2info.deviceName = p;
dri2info.driverName = "glamo";
+#ifdef USE_DRI2_1_1_0
+ dri2info.CreateBuffer = glamoCreateBuffer;
+ dri2info.DestroyBuffer = glamoDestroyBuffer;
+#else
dri2info.CreateBuffers = glamoCreateBuffers;
dri2info.DestroyBuffers = glamoDestroyBuffers;
+#endif
dri2info.CopyRegion = glamoCopyRegion;
if ( !DRI2ScreenInit(pScreen, &dri2info) ) return;
--
xf86-video-glamo, SMedia Glamo video driver for X.Org
More information about the pkg-fso-commits
mailing list