[cairo] [PATCH] V2 image: xlib/xcb backends use filtering to match image backend

Bill Spitzak spitzak at gmail.com
Tue Sep 23 13:23:08 PDT 2014



On 09/23/2014 12:41 PM, Chris Wilson wrote:
> On Tue, Sep 23, 2014 at 11:21:52AM -0700, Bill Spitzak wrote:
>>
>>
>> On 09/23/2014 12:59 AM, Uli Schlachter wrote:
>>> Hi,
>>>
>>> no idea about if this is a good idea. I'll let other decide about that.
>>
>> Ok latest word is that it is considered a good idea.
>
> Even I'm reasonably happy with this approach as it uses the existing
> acceleration where suitable (though I may quible at the exact definition
> of suitable ;-)
>
> I do think that maybe we need automatic caching of scaled sources...
> Though the answer is always that such is best left to the application,
> and I still believe that holds true here.

If scaling is ever done by making an intermediate scaled image then it 
would be a good idea to cache it. But the client can always do better.

One problem is the obvious way to create a mipmap is to scale by .5, but 
the code as currently written will not get the fast bilinear 
interpolation path. Bilinear is incorrect for scales less than one 
except if the scale is exactly .5 and there is an integer translation, 
where it just happens to work correctly. Perhaps it should detect this 
so clients trying to make their own mipmaps or scaled images can get 
this fast path.


More information about the cairo mailing list