aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdriswrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r--xorg-server/glx/glxdriswrast.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index 9bc8d3b6e..cebd132e8 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -107,8 +107,8 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
(*core->destroyDrawable)(private->driDrawable);
- FreeScratchGC(private->gc);
- FreeScratchGC(private->swapgc);
+ FreeGC(private->gc, (GContext)0);
+ FreeGC(private->swapgc, (GContext)0);
__glXDrawableRelease(drawable);
@@ -313,13 +313,12 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
XID glxDrawId,
__GLXconfig *glxConfig)
{
- ChangeGCVal gcvals[2];
+ XID gcvals[2];
+ int status;
__GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen;
__GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig;
__GLXDRIdrawable *private;
- ScreenPtr pScreen = driScreen->base.pScreen;
-
private = calloc(1, sizeof *private);
if (private == NULL)
return NULL;
@@ -335,13 +334,10 @@ __glXDRIscreenCreateDrawable(ClientPtr client,
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
- private->gc = CreateScratchGC(pScreen, pDraw->depth);
- private->swapgc = CreateScratchGC(pScreen, pDraw->depth);
-
- gcvals[0].val = GXcopy;
- ChangeGC(NullClient, private->gc, GCFunction, gcvals);
- gcvals[1].val = FALSE;
- ChangeGC(NullClient, private->swapgc, GCFunction | GCGraphicsExposures, gcvals);
+ gcvals[0] = GXcopy;
+ private->gc = CreateGC(pDraw, GCFunction, gcvals, &status, (XID)0, serverClient);
+ gcvals[1] = FALSE;
+ private->swapgc = CreateGC(pDraw, GCFunction | GCGraphicsExposures, gcvals, &status, (XID)0, serverClient);
private->driDrawable =
(*driScreen->swrast->createNewDrawable)(driScreen->driScreen,