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 <[email protected]> --- This subsumes my earlier "Delete redundant clip initializations" patch. fb/fbgc.c | 3 --- hw/xnest/GC.c | 3 --- hw/xwin/wingc.c | 5 ----- miext/cw/cw.c | 1 - miext/damage/damage.c | 1 - 5 files changed, 0 insertions(+), 13 deletions(-) diff --git a/fb/fbgc.c b/fb/fbgc.c index 2568698..7a73e0d 100644 --- a/fb/fbgc.c +++ b/fb/fbgc.c @@ -64,9 +64,6 @@ const GCOps fbGCOps = { Bool fbCreateGC(GCPtr pGC) { - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - pGC->ops = (GCOps *) &fbGCOps; pGC->funcs = (GCFuncs *) &fbGCFuncs; diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 4cfab29..e325d04 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 196b5b5..e351c50 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 58816c9..3da3bc3 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 2318a61..eaaf0ef 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -450,7 +450,6 @@ damageCreateGC(GCPtr pGC) damageGCPriv(pGC); Bool ret; - pGC->pCompositeClip = 0; unwrap (pScrPriv, pScreen, CreateGC); if((ret = (*pScreen->CreateGC) (pGC))) { pGCPriv->ops = NULL; -- 1.7.0 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
