summaryrefslogtreecommitdiff
path: root/source/fitz/list-device.c
AgeCommit message (Collapse)Author
2015-03-24Path packing for memory efficiency.Robin Watts
Introduce the concept of 'packed' paths. These reduce the header overhead for most common paths (ones with less than 256 commands and 256 coords) to a single 32bit int once stored in the display list. The previous commit reduces the torture-test.pdf from 95 to 87Meg. This commit futher reduces it to 70Meg.
2015-03-24Don't pass interpreter context to pdf_processor opcode callbacks.Tor Andersson
Update buffer and filter processors. Filter both colors and stroke states. Move OCG hiding logic into interpreter.
2015-02-24Update display list tile skipping.Robin Watts
When we meet cached tiles when rendering the display list, we need to skip over their contents. Previously we did this by skipping display list nodes in their entirety. With the new display list scheme however, we cannot simply skip nodes completely as the graphic state changes must be remembered. We therefore update the list playback routine to keep track of the clip depth and to skip the function calls as required.
2015-02-24Fix incorrect object culling in display list.Robin Watts
I was testing an untransformed rectangle. This was not being picked up as our cluster tests use the identity matrix.
2015-02-24Squash some warnings from scan build.Robin Watts
2015-02-20Rejig display device to have a more compact memory representation.Robin Watts
Rather than a linked list of display nodes, we use solid block of serialised data. We send a 32bit word, which contains various bitfields. These bitfields indicate the command type, and the presence or absence of various fields (such as paths, colorspaces, colors etc). If these fields are not present, they are held to be the same as the previous values.
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_*.
2015-02-17Reference count fz_path and fz_text.Tor Andersson
Disallow modification of shared fz_path and fz_text objects. They should follow a create once, consume often pattern, and as such should be immutable once created.
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-06-26Partially revert "Add missing fz_var() and fix potential memory leak."Matt Holgate
(Revert the fix for potential memory leak - there wasn't a potential memory leak as the device only takes ownership of it's display list if dev->free_user is set). This reverts commit ada560eb015e7b2208c492d47f28da8093733c4a.
2014-06-26Add missing fz_var() and fix potential memory leak.Matt Holgate
2013-09-27don't reset the clipping rectangle for accumulated textSimon Bünzli
FZ_CMD_CLIP_TEXT behaves quite differently whether the accumulate flag is set or not (see fz_list_clip_text). fz_run_display_list handles this correctly but fz_append_display_node doesn't do so yet.
2013-06-26Silence compiler warnings.Tor Andersson
2013-06-20Rearrange source files.Tor Andersson