[cairo] broken pixman bilinear filtering?

Bill Spitzak spitzak at d2.com
Mon Feb 13 14:17:27 PST 2006



Vladimir Vukicevic wrote:
> On 2/13/06, Bill Spitzak <spitzak at d2.com> wrote:
> 
>>Is this going to change XRender? That may be a bad idea. I have worked
>>around this bug, and I assumme many other people have, in XRender, by
>>adjusting the transformation before doing any scaling of images. If this
>>is fixed in XRender it will actually break these fixed programs. Another
>>alternative would be a test to tell if the implementation is the old or
>>new one.
>>
>>Fixing Cairo or any other API that is not in common use yet is entirely
>>appropriate, however.
> 
> 
> So this is an interesting question.. I realize that fixing XRender
> would cause breakage in the apps that work around this, but there
> aren't that many apps that would be hit by this yet, either.  The
> danger with not fixing it is that it will eventually make XRender
> basically unusable by apps, and we'll be back to the same situation
> where we were before XRender -- everyone using software fallbacks for
> everything, because they can't trust XRender.  There was already one
> such issue (the memory corruption caused by using a repeating picture)
> that was fixed in the server.

In this case the workaround is to adjust the transformation matrix sent 
to XRender. Thus we are not using a software fallback.

> In this particular case, one option is to keep the old code in, and
> rename the bilinear filter #define to BILINEAR_BROKEN_DEPRECATED or
> something, and add a new identifier for the "correct" bilinear
> processing.  But again, I don't know what the situation is with
> XRender development in the server, and what the potential would be to
> get this fix out in a release in the short term.

That sounds like it might be the right solution, rather than leaving it 
broken. Although technically the broken one is usable with the correct 
math, I found that figuring out how to correct the transformation is a 
real pain and would result in some ugly stuff in any code that tries to 
implement a correct API like Cairo atop XRender.


More information about the cairo mailing list