aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdriswrast.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-15 16:28:11 +0000
committermarha <marha@users.sourceforge.net>2010-05-15 16:28:11 +0000
commitc38dead3ea7e177728d90cd815cf4eead0c9f534 (patch)
treeb809dba1dc9013bb1e67a5ee388f2dd217dc0f88 /xorg-server/glx/glxdriswrast.c
parent6083a94d68878c9ad5f59b28bd07e4738e9fb7b4 (diff)
downloadvcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.tar.gz
vcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.tar.bz2
vcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.zip
xserver git update 15/5/2010
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r--xorg-server/glx/glxdriswrast.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index 8ab3daa46..acdcc645c 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -104,7 +104,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
__glXDrawableRelease(drawable);
- xfree(private);
+ free(private);
}
static GLboolean
@@ -138,7 +138,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext)
(*screen->core->destroyContext)(context->driContext);
__glXContextDestroy(&context->base);
- xfree(context);
+ free(context);
}
static int
@@ -254,7 +254,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
__glXScreenDestroy(baseScreen);
- xfree(screen);
+ free(screen);
}
static __GLXcontext *
@@ -274,7 +274,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
else
driShare = NULL;
- context = xcalloc(1, sizeof *context);
+ context = calloc(1, sizeof *context);
if (context == NULL)
return NULL;
@@ -292,14 +292,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
return &context->base;
}
-static void
-glxChangeGC(GCPtr gc, BITS32 mask, CARD32 val)
-{
- CARD32 v[1];
- v[0] = val;
- dixChangeGC(NullClient, gc, mask, v, NULL);
-}
-
static __GLXdrawable *
__glXDRIscreenCreateDrawable(ClientPtr client,
__GLXscreen *screen,
@@ -309,20 +301,21 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
XID glxDrawId,
__GLXconfig *glxConfig)
{
+ ChangeGCVal gcvals[2];
__GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
__GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
__GLXDRIdrawable *private;
ScreenPtr pScreen = driScreen->base.pScreen;
- private = xcalloc(1, sizeof *private);
+ private = calloc(1, sizeof *private);
if (private == NULL)
return NULL;
private->screen = driScreen;
if (!__glXDrawableInit(&private->base, screen,
pDraw, type, glxDrawId, glxConfig)) {
- xfree(private);
+ free(private);
return NULL;
}
@@ -333,9 +326,10 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
private->gc = CreateScratchGC(pScreen, pDraw->depth);
private->swapgc = CreateScratchGC(pScreen, pDraw->depth);
- glxChangeGC(private->gc, GCFunction, GXcopy);
- glxChangeGC(private->swapgc, GCFunction, GXcopy);
- glxChangeGC(private->swapgc, GCGraphicsExposures, FALSE);
+ gcvals[0].val = GXcopy;
+ ChangeGC(NullClient, private->gc, GCFunction, gcvals);
+ gcvals[1].val = FALSE;
+ ChangeGC(NullClient, private->gc, GCFunction | GCGraphicsExposures, gcvals);
private->driDrawable =
(*driScreen->swrast->createNewDrawable)(driScreen->driScreen,
@@ -450,7 +444,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
const __DRIconfig **driConfigs;
int i;
- screen = xcalloc(1, sizeof *screen);
+ screen = calloc(1, sizeof *screen);
if (screen == NULL)
return NULL;
@@ -527,7 +521,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
if (screen->driver)
dlclose(screen->driver);
- xfree(screen);
+ free(screen);
LogMessage(X_ERROR, "GLX: could not load software renderer\n");