aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdriswrast.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 20:12:58 +0000
commit2553bdd7c359cd87525d367761c86932cec5adff (patch)
treeae71245933c98474a699d3e392de5820879b2018 /xorg-server/glx/glxdriswrast.c
parente2c51f2ee7b0a3ea1a052fc49324057b4a4bbc78 (diff)
parent4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (diff)
downloadvcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.gz
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.bz2
vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.zip
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/glx/glxdriswrast.c')
-rw-r--r--xorg-server/glx/glxdriswrast.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index a1bd4032b..0a122d90a 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -93,7 +93,6 @@ struct __GLXDRIdrawable {
__GLXDRIscreen *screen;
GCPtr gc; /* scratch GC for span drawing */
- GCPtr cleargc; /* GC for clearing the color buffer */
GCPtr swapgc; /* GC for swapping the color buffers */
};
@@ -106,19 +105,11 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
(*core->destroyDrawable)(private->driDrawable);
FreeScratchGC(private->gc);
- FreeScratchGC(private->cleargc);
FreeScratchGC(private->swapgc);
- xfree(private);
-}
-
-static GLboolean
-__glXDRIdrawableResize(__GLXdrawable *drawable)
-{
- /* Nothing to do here, the DRI driver asks the server for drawable
- * geometry appropriately. */
+ __glXDrawableRelease(drawable);
- return GL_TRUE;
+ xfree(private);
}
static GLboolean
@@ -292,11 +283,10 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
else
driShare = NULL;
- context = xalloc(sizeof *context);
+ context = xcalloc(1, sizeof *context);
if (context == NULL)
return NULL;
- memset(context, 0, sizeof *context);
context->base.destroy = __glXDRIcontextDestroy;
context->base.makeCurrent = __glXDRIcontextMakeCurrent;
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
@@ -332,12 +322,10 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
ScreenPtr pScreen = driScreen->base.pScreen;
- private = xalloc(sizeof *private);
+ private = xcalloc(1, sizeof *private);
if (private == NULL)
return NULL;
- memset(private, 0, sizeof *private);
-
private->screen = driScreen;
if (!__glXDrawableInit(&private->base, screen,
pDraw, type, drawId, glxConfig)) {
@@ -346,16 +334,13 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
}
private->base.destroy = __glXDRIdrawableDestroy;
- private->base.resize = __glXDRIdrawableResize;
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
private->gc = CreateScratchGC(pScreen, pDraw->depth);
- private->cleargc = CreateScratchGC(pScreen, pDraw->depth);
private->swapgc = CreateScratchGC(pScreen, pDraw->depth);
glxChangeGC(private->gc, GCFunction, GXcopy);
- glxChangeGC(private->cleargc, GCFunction, GXcopy);
glxChangeGC(private->swapgc, GCFunction, GXcopy);
glxChangeGC(private->swapgc, GCGraphicsExposures, FALSE);
@@ -394,9 +379,6 @@ swrastPutImage(__DRIdrawable *draw, int op,
case __DRI_SWRAST_IMAGE_OP_DRAW:
gc = drawable->gc;
break;
- case __DRI_SWRAST_IMAGE_OP_CLEAR:
- gc = drawable->cleargc;
- break;
case __DRI_SWRAST_IMAGE_OP_SWAP:
gc = drawable->swapgc;
break;
@@ -475,10 +457,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
const __DRIconfig **driConfigs;
int i;
- screen = xalloc(sizeof *screen);
+ screen = xcalloc(1, sizeof *screen);
if (screen == NULL)
return NULL;
- memset(screen, 0, sizeof *screen);
screen->base.destroy = __glXDRIscreenDestroy;
screen->base.createContext = __glXDRIscreenCreateContext;