Bug 17693 - Use libspectre when available for ps tests
Summary: Use libspectre when available for ps tests
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.7.7
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-21 05:37 UTC by Carlos Garcia Campos
Modified: 2008-10-12 08:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix a small bug in any2ppm (812 bytes, patch)
2008-09-21 05:38 UTC, Carlos Garcia Campos
Details | Splinter Review
PS converter in any2ppm (5.33 KB, patch)
2008-09-21 05:39 UTC, Carlos Garcia Campos
Details | Splinter Review
ps2png (3.31 KB, patch)
2008-09-21 05:40 UTC, Carlos Garcia Campos
Details | Splinter Review

Description Carlos Garcia Campos 2008-09-21 05:37:23 UTC
Here are some patches.
Comment 1 Carlos Garcia Campos 2008-09-21 05:38:34 UTC
Created attachment 19059 [details] [review]
Fix a small bug in any2ppm 

This is just a fix for a bug in any2ppm when the filename contains more than one dot
Comment 2 Carlos Garcia Campos 2008-09-21 05:39:31 UTC
Created attachment 19060 [details] [review]
PS converter in any2ppm

Implement ps_converter in any2ppm
Comment 3 Carlos Garcia Campos 2008-09-21 05:40:37 UTC
Created attachment 19061 [details] [review]
ps2png

Add ps2png test program like the svg and pdf ones.
Comment 4 Chris Wilson 2008-09-21 06:21:21 UTC
Along one branch I did use spectre for the test suite, but I found that the output from the gs display device had more discrepancies wrt the reference images than the pngAlpha device.

In order to use spectre/gs for the PS test suite target, you also need to adjust the boilerplate code to call any2ppm. See the patch to cairo-boilerplate-ps.c within
http://gitweb.freedesktop.org/?p=users/ickle/cairo;a=commitdiff;h=d45c8d348bb1f957f4f927abef24e114745722a2.

Once the test suite is using any2ppm to rasterise PS, I would like to start using gs in a jobserver mode in order to avoid the initialisation overhead (which is quite substantial) and to start using the cairo output device. (In short running the full test-suite over 2/3 of the elapsed time is spent within gs. Hacks like micro-GS show that is possible to substantially reduce that time, but lack the independence and maturity required to provide conformance testing.) Carlos, can you suggest the best way to tackle this using spectre?
Comment 5 Chris Wilson 2008-10-09 04:28:34 UTC
Thankyou Carlos, I've pushed the additional utilities to use libspectre. If you do know a way of reducing the time it takes for the test-suite to run ghostscript and ways of passing additional arguments to ghostscript (for example, we pass "-c 2 .setlanguagelevel -f" to enable conformance testing of PostScript level 2 surfaces) please let us know.
Comment 6 Carlos Garcia Campos 2008-10-12 08:54:19 UTC
Hi Chris, sorry for not replying before,

(In reply to comment #4)
> Along one branch I did use spectre for the test suite, but I found that the
> output from the gs display device had more discrepancies wrt the reference
> images than the pngAlpha device.

Currently it's only possible to render using the display device (well and pdfwrite) but I'm open to new ideas. Probably a lower level API that allows using gs with any device and any additional parameters. 

> In order to use spectre/gs for the PS test suite target, you also need to
> adjust the boilerplate code to call any2ppm. See the patch to
> cairo-boilerplate-ps.c within
> http://gitweb.freedesktop.org/?p=users/ickle/cairo;a=commitdiff;h=d45c8d348bb1f957f4f927abef24e114745722a2.
> 
> Once the test suite is using any2ppm to rasterise PS, I would like to start
> using gs in a jobserver mode in order to avoid the initialisation overhead
> (which is quite substantial) and to start using the cairo output device. (In
> short running the full test-suite over 2/3 of the elapsed time is spent within
> gs. Hacks like micro-GS show that is possible to substantially reduce that
> time, but lack the independence and maturity required to provide conformance
> testing.) Carlos, can you suggest the best way to tackle this using spectre?
> 

Right now we are creating and destroying the gs instance when rendering every page. I already had in mind to try using a single gs instance per document, but I'm not sure it helps so much.



Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.