[PATCH 1/3] exa/mixed: avoid copying back pixmap data when no migration took place

Dave Airlie airlied at redhat.com
Sun Nov 8 14:57:28 PST 2009


On Sat, 2009-11-07 at 13:32 +0100, Maarten Maathuis wrote:
> - When the driver handles the prepare access no copying is needed.
> - Delayed pixmap creation should be fine, because it's handled by the
>   first prepare access, but the exaPixmapIsOffscreen check in finish access
>   will return FALSE without a driver pixmap.
> 
> Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
> ---
>  exa/exa_migration_mixed.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
> index 6065d75..7458e3c 100644
> --- a/exa/exa_migration_mixed.c
> +++ b/exa/exa_migration_mixed.c
> @@ -210,7 +210,8 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
>  {
>      ExaPixmapPriv(pPixmap);
>  
> -    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
> +    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap) &&
> +	    !pExaPixmap->offscreen) {

This is just an observation, but I do find the fact we have two things

exaPixmapIsOffscreen(pPixmap)
and
!pExaPixmap->offscreen

Like I know they are different but really seriously can anyone know
the difference just by reading this?

EXA has become quite complicated recently and very difficult to trace
through, this naming doesn't help.

Dave.




More information about the xorg-devel mailing list