Re: More 24bit optimizations (was: a just another stupid newbie :)

Jaymz Julian <jaymz-y6qSm6YX8/[email protected]>
Newsgroups gmane.comp.freedesktop.xserver
Message-ID <[email protected]>
On Sat, Dec 13, 2003 at 09:01:29PM -0800, Keith Packard wrote:
> 
> Around 14 o'clock on Dec 14, Jaymz Julian wrote:
> 
> > @@ -1281,7 +1570,7 @@ fbComposite (CARD8      op,
> >  	    x_src = pbox->x1 - xDst + xSrc;
> >  	    x_msk = pbox->x1 - xDst + xMask;
> >  	    x_dst = pbox->x1;
> > -	    if (maskRepeat)
> > +	    if (maskRepeat && pMask->pDrawable->height > 1)
> >  	    {
> >  		y_msk = mod (y_msk, pMask->pDrawable->height);
> >  		if (h_this > pMask->pDrawable->height - y_msk)
> > @@ -1296,7 +1585,7 @@ fbComposite (CARD8      op,
> >  	    while (w)
> >  	    {
> >  		w_this = w;
> > -		if (maskRepeat)
> > +		if (maskRepeat && pMask->pDrawable->width > 1)
> >  		{
> >  		    x_msk = mod (x_msk, pMask->pDrawable->width);
> >  		    if (w_this > pMask->pDrawable->width - x_msk)
> 
> What are these two changes for?

for avoiding calling fbCompositeGeneral millions of times for a 1x1 solid
mask (once per pixel), since it seemed to bound it anyhow.  On second look, 
perhaps it wasn't the most wise/safe way to achieve that, so maybe i need
to look at that again.

	-- jj

--
Jaymz Julian aka A Life in Hell / Warriors of the Wasteland / Unreal
Coder, Visionary, Fat Ass.
"Hannibal is a serial killer. He only likes to kill and eat people. 
 Very few people have `I want to be killed and eaten' on their cards, 
 so Hannibal is out of a job." - http://cards.sf.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.