diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-23 17:15:43 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-09-13 15:55:17 -0700 |
commit | bbbf795e6b1ac048ea17164ba1089055cfe4306d (patch) | |
tree | 3d3901ca3d0ab52fe5d58e030d3c82624bb378fc | |
parent | 3288232f3d2a0239944bd856101c2d16c713ef40 (diff) |
Delete redundant GC initializations.
When a GC is allocated, it is zeroed, including all storage requested
with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize
anything to zero.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | fb/fbgc.c | 8 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaGC.c | 5 | ||||
-rw-r--r-- | hw/xnest/GC.c | 3 | ||||
-rw-r--r-- | hw/xwin/wingc.c | 5 | ||||
-rw-r--r-- | miext/cw/cw.c | 1 | ||||
-rw-r--r-- | miext/damage/damage.c | 1 |
6 files changed, 1 insertions, 22 deletions
@@ -64,19 +64,13 @@ const GCOps fbGCOps = { Bool fbCreateGC(GCPtr pGC) { - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - pGC->ops = (GCOps *) &fbGCOps; pGC->funcs = (GCFuncs *) &fbGCFuncs; /* fb wants to translate before scan conversion */ pGC->miTranslate = 1; + pGC->fExpose = 1; - fbGetRotatedPixmap(pGC) = 0; - fbGetExpose(pGC) = 1; - fbGetFreeCompClip(pGC) = 0; - fbGetCompositeClip(pGC) = 0; fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth); return TRUE; } diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c index fb243874e..44d50e6b6 100644 --- a/hw/xfree86/xaa/xaaGC.c +++ b/hw/xfree86/xaa/xaaGC.c @@ -48,11 +48,6 @@ XAACreateGC(GCPtr pGC) pGCPriv->wrapOps = NULL; pGCPriv->wrapFuncs = pGC->funcs; pGCPriv->XAAOps = &XAAFallbackOps; - pGCPriv->flags = 0; - pGCPriv->DashLength = 0; - pGCPriv->DashPattern = NULL; - pGCPriv->changes = 0; - /* initialize any other private fields here */ pGC->funcs = &XAAGCFuncs; } diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 407cc77f3..7968b4f6f 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -73,9 +73,6 @@ static GCOps xnestOps = { Bool xnestCreateGC(GCPtr pGC) { - pGC->clientClipType = CT_NONE; - pGC->clientClip = NULL; - pGC->funcs = &xnestFuncs; pGC->ops = &xnestOps; diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c index 196b5b5dd..e351c502d 100644 --- a/hw/xwin/wingc.c +++ b/hw/xwin/wingc.c @@ -137,11 +137,6 @@ winCreateGCNativeGDI (GCPtr pGC) pGC->depth); #endif - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - pGC->freeCompClip = FALSE; - pGC->pCompositeClip = 0; - pGC->ops = (GCOps *) &winGCOps; pGC->funcs = (GCFuncs *) &winGCFuncs; diff --git a/miext/cw/cw.c b/miext/cw/cw.c index 58816c9a2..3da3bc3e1 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -325,7 +325,6 @@ cwCreateGC(GCPtr pGC) ScreenPtr pScreen = pGC->pScreen; Bool ret; - memset(pPriv, 0, sizeof(cwGCRec)); SCREEN_PROLOGUE(pScreen, CreateGC); if ( (ret = (*pScreen->CreateGC)(pGC)) ) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 2b7e5f229..21cbb78c9 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -446,7 +446,6 @@ damageCreateGC(GCPtr pGC) damageGCPriv(pGC); Bool ret; - pGC->pCompositeClip = 0; unwrap (pScrPriv, pScreen, CreateGC); if((ret = (*pScreen->CreateGC) (pGC))) { pGCPriv->ops = NULL; |