diff options
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r-- | xorg-server/glx/glxdriswrast.c | 32 |
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");
|