diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-09-28 17:51:30 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-10-01 12:19:36 +0100 |
commit | 4fbdba66f22d7388592c7946de16ec3ee79ade36 (patch) | |
tree | 6ddc28078aabd9635da859e3cde91d08ae707459 /pdf/pdf_util.js | |
parent | a1a37ae36043d8dba89cecfa345119ad32f81b9e (diff) | |
download | mupdf-4fbdba66f22d7388592c7946de16ec3ee79ade36.tar.xz |
Bug 693330: Change shadings to decompose to meshes at render time.
Currently, the mupdf code loads shadings at parse time, and
instantly decomposes them into a mesh of triangles. This mesh
of triangles is the transformed and rendered as required.
Unfortunately the storage space for the mesh is typically much
greater than the original representation.
In this commit, we move the shading stream parsing/decomposition
code into a general 'fz_process_mesh' function within res_shade.
We then grab a copy of the buffer at load time, and 'process'
(decompose/paint) at render time.
For the test file on the bug, memory falls from the reported 660Mb
to 30Mb. For another test file (txt9780547775815_ingested.pdf
page 271) it reduces memory use from 750Meg to 33Meg. These figures
could be further reduced by storing the compressed streams from the
pdf file rather than the uncompressed ones.
Incorporating typo fix and unused function removal from Sebras. Thanks.
Remove unused function in shading code
Diffstat (limited to 'pdf/pdf_util.js')
0 files changed, 0 insertions, 0 deletions