[cairo] xlib bug, with testcase

Behdad Esfahbod behdad at behdad.org
Wed May 28 11:56:21 PDT 2008


On Wed, 2008-05-28 at 14:25 -0400, Antoine Azar wrote:
> Hey Vlad,
> 
> There are rendering problems on Win32 too. I traced it, and the bug seems to
> be coming from the fbCompositeSrc_x888xnx8888mmx function.
> 
> If you comment out this loop, it all works fine:
> 
> 	while (w >= 16)
> 	{
> 	    __m64 vd0 = *(__m64 *)(dst + 0);
> 	    __m64 vd1 = *(__m64 *)(dst + 2);
> 
> ......
> 
> 	    *(__m64 *)(dst + 14) = vd7;
> 
> 	    w -= 16;
> 	    dst += 16;
> 	    src += 16;
> 	}
> 
> That's a temporary fix, I have no idea what the problem inside this loop
> might be, maybe Fred can shed some light.

That function is not ignoring source alpha as it should be.  Attaching
fix.  Going to do a quick review of other places that may have the same
bug.

> I'm attaching my resulting images, with and without MMX, and opaque and
> non-opaque. The non-opaque ones are fine because we're calling a much
> simpler code path, although the MMX version still gives a different result
> from the non-MMX one.
> 
> Best,
> 
> Antoine 
> 
> > -----Original Message-----
> > From: cairo-bounces at cairographics.org 
> > [mailto:cairo-bounces at cairographics.org] On Behalf Of 
> > Vladimir Vukicevic
> > Sent: Tuesday, May 27, 2008 7:51 PM
> > To: cairo at cairographics.org
> > Subject: [cairo] xlib bug, with testcase
> > 
> > 
> > Howdy,
> > 
> > This showed up as https://bugzilla.mozilla.org/show_bug.cgi?id=433917
> > -- it seems to happen on linux and win32, though I haven't 
> > tried reproducing it on win32.  The attached testcase shows 
> > the problem; I've also attached the ref rendering from the 
> > image backend.  If the first paint_with_alpha has an alpha 
> > value less than 1.0, then..  
> > strange things happen, I'm not even sure exactly what.  I'll 
> > try to figure out a regression range in the next few days, 
> > though if someone wants to beat me to it, please feel free :)
> > 
> >      - Vlad
> > 
> > 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixman-fbCompositeSrc_x888xnx8888mmx-alpha.patch
Type: text/x-patch
Size: 2989 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080528/fc8e8c62/attachment.bin 


More information about the cairo mailing list