[cairo] [PATCH v3 0/3] test: Add test for image downscaling

Bryce W. Harrington b.harrington at samsung.com
Tue Sep 10 10:06:00 PDT 2013


These are tests for the recently integrated downscaling support.  This
patchset includes some simple tests for three scaling factors, for each
of the filter options.

This patchset is also posted to the 'downscaling' branch in my fdo git
repo:

  http://cgit.freedesktop.org/~bryce/cairo/

Changes since v2:
  * Add comment describing test
  * Change to const char[] for consistency
  * Move fix to build error from patch 2 to patch 1

Changes since v1:
  * Replaced the 95-pixel reference images with image backend's output
  * Added 'downscale' keyword to tests
  * Revised cover letter (below)


Test Results
------------

Running 'cairo-test-suite -k downscale' with this patch produces these
results:

                  1.12.16   Trunk
 Passed:           235	     224
 Failed:           185	     195
 Expected Failed:  0  	     0  
 Error:            0  	     0  
 Crashed:          0  	     0  
 Untested:         0  	     0  
 Total:            420	     420

The first column is the cairo 1.12.16 release, which did not include the
new pixman downscaling patch, and the second column is current trunk
which does include it.  Both were built with pixman 0.31.1 (which the
downscaling patch requires).

The change in results is principally in the 24 pixel case.  In this
case, since there is an easy 1:4 downscaling, my expectation is that all
filters should result in a crisp image with no blurring.  And in 1.12.16
this is indeed pretty much what happens, so this is a legitimate
regression.

The other change in results is a few of the 95 pixel cases, which go
from failing in 1.12.16 to passing with trunk.  This test case exercises
the previously bugged behavior.  Here we're taking the pixman results as
truth.

Other failures were unchanged from 1.12.16 to trunk.  The image16
failures I believe to just be differences in how colors are handled, but
I'm not certain.  So possibly these can be considered acceptable backend
behavior.

The ps2/ps3 tests appear to be blurring the edges even when not
necessary.  Perhaps this is just acceptable backend but visually it's
clearly worse, so unless there's a Postscript specification with the
intent that it looks this way, I count it as a fail.



Bryce W. Harrington (3):
  test: Make cairo_test_mkdir() usable throughout tests.
  test: Ensure output dirs exist, falling back to current dir if needed
  svg, test: Refer to output filename by variable, not a hardcoded
    value

 test/cairo-test.c          |   10 +++++-----
 test/cairo-test.h          |    3 +++
 test/create-for-stream.c   |   14 +++++++++++---
 test/fallback-resolution.c |   20 +-------------------
 test/multi-page.c          |    9 ++++++---
 test/pdf-features.c        |    6 +++++-
 test/pdf-mime-data.c       |    6 +++++-
 test/pdf-surface-source.c  |    6 +++++-
 test/png.c                 |    8 +++++++-
 test/ps-eps.c              |   20 +-------------------
 test/ps-features.c         |    8 +++++---
 test/ps-surface-source.c   |    6 +++++-
 test/svg-clip.c            |    6 +++++-
 test/svg-surface-source.c  |    6 +++++-
 test/svg-surface.c         |    8 ++++++--
 15 files changed, 75 insertions(+), 61 deletions(-)

-- 
1.7.9.5


More information about the cairo mailing list