[patch] exa: fix pitch handling in ModifyPixmapHeader

Michel Dänzer michel at tungstengraphics.com
Thu Apr 17 09:36:19 PDT 2008


On Thu, 2008-04-17 at 16:34 +0200, Tilman Sauerbeck wrote:
> Zhenyu Wang [2008-04-17 17:23]:
> 
> > ---
> > diff --git a/exa/exa.c b/exa/exa.c
> > index 81dc3e2..3369c3a 100644
> > --- a/exa/exa.c
> > +++ b/exa/exa.c
> > @@ -386,6 +386,9 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
> >      if (pExaPixmap) {
> >  	pExaPixmap->sys_ptr = pPixData;
> >  
> > +	if (pExaPixmap->fb_pitch == 0)
> > +	    pExaPixmap->fb_pitch = devKind;
> > +
> >          exaSetAccelBlock(pExaScr, pExaPixmap,
> >                           width, height, bitsPerPixel);
> >      }
> 
> Shouldn't we set fb_pitch even if the current value isn't zero?
> Shouldn't we also set sys_pitch = devKind?

I think so, too, and pExaScr->info->pixmapPitchAlign should probably
also be enforced for fb_pitch.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the xorg mailing list