More 24bit optimizations (was: a just another stupid newbie :)
Jaymz Julian
jaymz@artificial-stupidity.net
Sun, 14 Dec 2003 19:34:31 +1100
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