[PATCH 1/3] damage: Remove isWindow from the DamageRec

Alex Deucher alexdeucher at gmail.com
Wed Sep 11 14:43:05 PDT 2013


On Wed, Sep 11, 2013 at 5:26 PM, Adam Jackson <ajax at redhat.com> wrote:
> There's no good reason to waste memory on this, we're already stashing a
> pointer to the drawable.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>

For the series:

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  miext/damage/damage.c    | 6 +-----
>  miext/damage/damagestr.h | 1 -
>  2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/miext/damage/damage.c b/miext/damage/damage.c
> index cc02991..63fe89a 100644
> --- a/miext/damage/damage.c
> +++ b/miext/damage/damage.c
> @@ -1469,7 +1469,7 @@ damageDestroyPixmap(PixmapPtr pPixmap)
>
>          while ((pDamage = *pPrev)) {
>              damageRemoveDamage(pPrev, pDamage);
> -            if (!pDamage->isWindow)
> +            if (pDamage->pDrawable->type == DRAWABLE_WINDOW)
>                  DamageDestroy(pDamage);
>          }
>      }
> @@ -1700,7 +1700,6 @@ DamageCreate(DamageReportFunc damageReport,
>      pDamage->damageLevel = damageLevel;
>      pDamage->isInternal = isInternal;
>      pDamage->closure = closure;
> -    pDamage->isWindow = FALSE;
>      pDamage->pDrawable = 0;
>      pDamage->reportAfter = FALSE;
>
> @@ -1743,10 +1742,7 @@ DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage)
>  #endif
>          pDamage->pNextWin = *pPrev;
>          *pPrev = pDamage;
> -        pDamage->isWindow = TRUE;
>      }
> -    else
> -        pDamage->isWindow = FALSE;
>      pDamage->pDrawable = pDrawable;
>      damageInsertDamage(getDrawableDamageRef(pDrawable), pDamage);
>      (*pScrPriv->funcs.Register) (pDrawable, pDamage);
> diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
> index 36753ee..eb50482 100644
> --- a/miext/damage/damagestr.h
> +++ b/miext/damage/damagestr.h
> @@ -40,7 +40,6 @@ typedef struct _damage {
>      DamageReportLevel damageLevel;
>      Bool isInternal;
>      void *closure;
> -    Bool isWindow;
>      DrawablePtr pDrawable;
>
>      DamageReportFunc damageReport;
> --
> 1.8.3.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list