[PATCH 5/6] clients: image: use cairo for getting image

Bill Spitzak spitzak at gmail.com
Fri Dec 16 10:58:27 PST 2011


On 12/16/2011 07:59 AM, Tiago Vignatti wrote:
> From: Tiago Vignatti<tiago.vignatti at intel.com>

> I set nearest-neighbor filtering on
> cairo which gives a better effect when resizing.
> Images now are scaled-up correctly without ugly black background.

Any chance you could report this to Cairo in some more forceful way? I 
don't know if the people working on Wayland might have some more sway 
but this is getting increasingly frustrating.

Basically Cairo's EXTEND_NONE does not do what anybody wants, which is 
further annoying because it is the default. You can get what you want 
while preserving the antialiasing by setting EXTEND_PAD and first 
setting the Cairo mask to a parallelogram which is the transformed 
bounds of the source image.

It would be nice however if the Cairo developers woke up and realized 
that this behavior is what everybody wants and changed EXTEND_NONE to do 
this automatically. They are refusing because this is not what XRender 
does and because they are extremely paranoid about back-compatibility 
(despite the fact that this only makes a difference if the scale is more 
than one, and Cairo currently has crap filtering for that so no real 
programs are using it).


More information about the wayland-devel mailing list