[cairo] [PATCH 1/3] NEWS: Bring up to date with recent bug fixes.
spitzak at gmail.com
Mon Sep 22 18:01:47 PDT 2014
On 09/17/2014 08:40 PM, Bryce Harrington wrote:
> when viewing large images on low resolution devices, as firefox and
> chromium already do.
> + Filter generator:
> + - Single filter, no "reconstruction" and "sample" filter
> + - Filters for derivative < 1 work
> + - Fixed IMPULSE and BOX
> + - Added TENT, CATMULL_ROM, NOTCH. Remove LANZCOS2.
> + - Renamed CUBIC to MITCHELL
> + Cairo's filter settings:
> + - CAIRO_FILTER_GOOD: uses BOX filter for scales less than .75 in
> + either direction. Uses PIXMAN_FILTER_GOOD (ie BILINEAR) otherwise.
> + - CAIRO_FILTER_BEST: uses CATMULL filter always. Upscaling more than
> + 2x will produce anti-aliased square pixels, similar to OS/X.
> + - CAIRO_FILTER_GAUSSIAN: this obsolete value is used to test other
> + filters. The program must declare and poke the filter into the
> + static variable ikernel. This should be removed for production
> + code.
This is not really accurate, as my patch included code that was intended
to go into pixman but is unreachable from the current cairo api. You
can't actually specify any of those filters types using cairo so it
probably should not be mentioned. And the gaussian setting in the
current patch is very simple. Correct docs may look like this:
Filtering improvements for the image backend, in particular down-scaling
of images produces filtered images that depend on all the pixels of the
source. When using the image backend you get the following settings:
CAIRO_FILTER_GOOD: uses a box filter for scales less than .75 in
either direction. For scales larger than this the same filter as
CAIRO_FILTER_BILINEAR is used
CAIRO_FILTER_BEST: uses a Catmull-Rom filter always. When upscaling
more than 2x this will produce anti-aliased square pixels, similar to OS/X.
CAIRO_FILTER_GAUSSIAN: uses PIXMAN_FILTER_BEST, which in current
pixman is the same as BILINEAR. (may also want to point out that this is
subject to change in the future).
Note that other backends, in particular xlib/xcb, do not implement these
filtering fixes yet, however other actions may cause them to use an
image fallback which will cause these filters to be used.
More information about the cairo