[cairo] Running cairo-test-suite with -as / cairo_surface_set_device_scale() and the test suite / image scaling madness

Bryce W. Harrington b.harrington at samsung.com
Wed Jul 9 16:48:22 PDT 2014


On Wed, Jul 09, 2014 at 01:08:17PM -0700, Bill Spitzak wrote:
> I am working on a new version of the patch that moves all the
> changes to pixman. It appears this will be a lot cleaner, and will
> make it work for X11 backends. Changes are:
> 
> - Rename PIXMAN_KERNEL_LINEAR to PIXMAN_KERNEL_BILINEAR. This makes
> it clear that it is identical to the built-in BILINEAR.
> 
> - Add enumeration for PIXMAN_KERNEL_TRIANGLE. Some software uses
> this and it may be what users expected from "linear".
> 
> - Rename PIXMAN_KERNEL_CUBIC to PIXMAN_KERNEL_MITCHELL (to avoid
> confusion as most software uses "cubic" for an interpolating filter)
> 
> - Replace PIXMAN_KERNEL_GAUSSIAN with PIXMAN_KERNEL_NOTCH (gaussian
> is useless for reconstruction, notch is useful and is similar blurry
> result). Note that actual blurring of images will want gaussian but
> that is not image reconstruction!
> 
> - Replace PIXMAN_KERNEL_LANCZOS2 with PIXMAN_KERNEL_CATMULL_ROM (it
> is almost infinitesimally different, and some argue it is nicer, and
> matches other software).
> 
> - Add aliases for these so old code still works.
> 
> - Rewrite pixman_filter_create_separable_convolution. New filter
> generating function takes the size and distance, rather than one
> number, allowing them to integrate over the source pixels. If
> "reconstruction" is not impulse it will use it at size=1 for sizes
> less than one, otherwise it uses the "sampling" filter.
> 
> - Make PIXMAN_FILTER_GOOD use the box convolution for scales less
> than .75, otherwise BILINEAR.
> 
> - Make PIXMAN_FILTER_BEST use CATMULL_ROM at all scales (thus
> producing square pixels when scaling up).
> 
> Any opinions?

Hi Bill,

Sounds like a decent plan.  I don't have an opinion on the renames, but
am guessing that's something others may want to weigh in on.  +1 to
having aliases.

I think moving it into pixman is the right long term plan.  But if it's
likely that it will take a while for the changes to land in pixman,
and/or be a while before the next pixman release, I wouldn't be opposed
to temporarily carrying the filters in cairo, like in your v5 patch.  It
might enable wider testing before things are finalized.  I know that at
least the Inkscape crew is eager to get their hands on something to try
out.

Would it help to have review comments on the v5 patch, or should I hold
off for the next one?  I noticed a few typos, nothing major.

Bryce


More information about the cairo mailing list