Re: [PATCH 4/4] miext/damage: Only wrap into the GC ops chain if there's a listener
On 12/17/11 8:03 PM, Aaron Plattner wrote: I think this needs to be accompanied by a change to DamageRegister (or miDamageRegister) to bump the drawable's serial number, or else creating a Damage object on a drawable won't cause GCs that are already validated against it to have the damage ops hooked in. Right you are. Will resend. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 4/4] miext/damage: Only wrap into the GC ops chain if there's a listener
On 12/13/2011 02:31 PM, Adam Jackson wrote: Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square Signed-off-by: Adam Jacksona...@redhat.com --- miext/damage/damage.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d791211..dd4026b 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -437,9 +437,13 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { +drawableDamage(pDrawable); DAMAGE_GC_FUNC_PROLOGUE (pGC); (*pGC-funcs-ValidateGC)(pGC, changes, pDrawable); -pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +if (pDamage) + pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +else + pGCPriv-ops = NULL; DAMAGE_GC_FUNC_EPILOGUE (pGC); } I think this needs to be accompanied by a change to DamageRegister (or miDamageRegister) to bump the drawable's serial number, or else creating a Damage object on a drawable won't cause GCs that are already validated against it to have the damage ops hooked in. -- Aaron ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 4/4] miext/damage: Only wrap into the GC ops chain if there's a listener
Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square Signed-off-by: Adam Jackson a...@redhat.com --- miext/damage/damage.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d791211..dd4026b 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -437,9 +437,13 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { +drawableDamage(pDrawable); DAMAGE_GC_FUNC_PROLOGUE (pGC); (*pGC-funcs-ValidateGC)(pGC, changes, pDrawable); -pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +if (pDamage) + pGCPriv-ops = pGC-ops; /* just so it's not NULL */ +else + pGCPriv-ops = NULL; DAMAGE_GC_FUNC_EPILOGUE (pGC); } -- 1.7.7 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 4/4] miext/damage: Only wrap into the GC ops chain if there's a listener
On Tue, 13 Dec 2011 17:31:53 -0500, Adam Jackson a...@redhat.com wrote: Before: 4000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square After: 4000 trep @ 0.0008 msec (1191807.5/sec): PutImage 10x10 square 6000 trep @ 0.0005 msec (2180983.0/sec): ShmPutImage 10x10 square Signed-off-by: Adam Jackson a...@redhat.com Reviewed-by: Eric Anholt e...@anholt.net pgpOtez327FCq.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel