summaryrefslogtreecommitdiff
path: root/source/fitz/test-device.c
AgeCommit message (Collapse)Author
2015-02-17Use embedded superclass struct instead of user pointer in devices.Tor Andersson
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2015-02-17Rename fz_close_* and fz_free_* to fz_drop_*.Tor Andersson
Rename fz_close to fz_drop_stream. Rename fz_close_archive to fz_drop_archive. Rename fz_close_output to fz_drop_output. Rename fz_free_* to fz_drop_*. Rename pdf_free_* to pdf_drop_*. Rename xps_free_* to xps_drop_*.
2014-09-09test-device: Abort interpretation when color found.Robin Watts
Add a new class of errors and use them to abort interpretation when the test device detects a color page.
2014-09-08Update test-device to check images piecemeal.Robin Watts
Rather than decoding entire image only to give up after we find the very first pixel is color, add code so that the test-device can treat the image as a stream. This means that (for most image types at least) we can bale out without decoding everything. This reduces the runtime of 3001Pages.pdf from 14 minutes to 18 seconds.
2014-09-02Fix memory leaks in test_device.Robin Watts
We were failing to drop each pixmap after testing it, and to free the test_device structure at the end of each run.
2014-09-01Performance improvement for test-device.Robin Watts
When we detect that a page is color, set the ignore image hint to avoid us loading future images. The overhead on loading images is not generally huge, except for JPEG2000 ones, which currently require decoding at load time. This therefore saves lots of time for such files. Also, a tiny tweak to ignore page components with 0 alpha.
2014-08-27Revise test-device; thresholding and exhaustive checking.Tor Andersson
The original version of the test-device could characterise pages as being grayscale/color purely based on the colorspaces used. This could easily be upset by grayscale images or shadings that happened to be specified in non-grayscale colorspaces however. We now look at the actual shading and image color values, and use a threshold value to allow for some measure of rounding errors in color values that are in practice grayscale.
2014-08-11Fix commit: Minor optimization in test_device.Tor Andersson
Invert the boolean test to mean what is actually intended. Fixes bug 695419.
2014-07-17Minor optimization in test_device.Ray Johnston
Don't convert and compare color if we already know the page has color.
2014-07-17Add feature testing device, and call it from mudraw with -T flag.Tor Andersson
Currently only tests for the presence of non-grayscale color.