[cairo] [PATCH] Image scaling regression test script and 'fbCompositeSrcScaleNearest' bugfixes
Siarhei Siamashka
siarhei.siamashka at nokia.com
Thu Apr 2 05:01:29 PDT 2009
On Thursday 02 April 2009 02:25:51 ext Jeff Muizelaar wrote:
[...]
> > > The alpha change I don't understand. Note this line:
> > >
> > > && pSrc->bits.format == pDst->bits.format
> > >
> > > down in the if statement; fbCompositeSrcScaleNearest() only gets
> > > called when source and destination have the same format, so copying
> > > pixels directly between them should be correct, and there should be no
> > > need for masking in 0xff in the alpha channel.
> >
> > This is a bit of gray area. This change is needed to provide exactly the
> > same rendering results as the generic path. Generic path always sets the
> > (unneeded) alpha bits to 0xFF if the source picture had them set to
> > something different. But if the values of these bits are actually
> > supposed to be "undefined", then the test program needs to be modified
> > not to take them into account when checking correctness of rendering.
>
> The alpha bits are defined as 'undefined' with x8r8g8b8 so this change
> is unneeed. See fbCompositeSrc_8888xx888 as an example.
The sources of pixman are somewhat inconsistent regarding the handling of this
unused x8 part, that's why I can't trust them ;) Also see 'fbStore_x8r8g8b8'
function as another example. I'm fine with either way, but just wanted to get
a confirmation about what behavior is considered correct. This minor
inconsistency can be easily spotted by automated tests and affects their
pass/fail verdict, that's why a definite clarification would be nice.
Another question. Can 'undefined' state of this extra byte in x8r8g8b8
theoretically result in some problems for XRender extension, cairo or any
other pixman users?
--
Best regards,
Siarhei Siamashka
More information about the cairo
mailing list