diff options
author | Bill Spitzak <spitzak@gmail.com> | 2014-07-18 18:46:26 -0700 |
---|---|---|
committer | Bryce Harrington <b.harrington@samsung.com> | 2014-07-25 12:16:53 -0700 |
commit | f337342c88092a251dc00476c4a9880d1cb90822 (patch) | |
tree | d074033ca29210fbdfa097c1e26a7f0cd4943572 /src/cairo-xlib-display.c | |
parent | e71b917bbfc881ddd6ae6ed4367efd328a95af93 (diff) | |
download | cairo-f337342c88092a251dc00476c4a9880d1cb90822.tar.gz |
V6 image: Use convolution filters for sample reconstruction when downscaling
This version removes testing code and has some changes to match my current
pixman version. My proposed pixman patch (not finished yet) will produce
exactly the same results as this cairo patch.
This code contains an all-new filter generator to replace the one that is
in pixman. Results in 222 pass/298 failed image tests, which is much better
than the previous versions of this patch.
Filter generator (which should probably be in pixman):
- 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 varialbe
ikernel. This should be removed for production code.
NYI: This version uses the fallback for xlib always. The xlib and xcb backends
must be rewritten to use the fallback version if filtering is needed. Or the
filtering code must be moved to XRender.
Diffstat (limited to 'src/cairo-xlib-display.c')
-rw-r--r-- | src/cairo-xlib-display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c index a2a3bc792..7d9a38447 100644 --- a/src/cairo-xlib-display.c +++ b/src/cairo-xlib-display.c @@ -151,7 +151,7 @@ static const cairo_device_backend_t _cairo_xlib_device_backend = { static void _cairo_xlib_display_select_compositor (cairo_xlib_display_t *display) { -#if 1 +#if 0 if (display->render_major > 0 || display->render_minor >= 4) display->compositor = _cairo_xlib_traps_compositor_get (); else if (display->render_major > 0 || display->render_minor >= 0) |