Age | Commit message (Collapse) | Author |
|
Use just 1 loop rather than 2, and count downwards as this is faster
on most architectures.
For the 'hash tabled memoized' general case, the time taken to form the
hashes is significant. Add some code to check that the pixel isn't the
same as the one we just did and bypass the hash.
|
|
The BOM was erroneously being emitted as a text node.
|
|
|
|
We still need to have the callback for type 3 fonts that are uncacheable.
With this change the callback is only ever called directly from the
interpreter in fz_prepare_t3_glyph and fz_render_t3_glyph_direct.
|
|
This means that repeated scaling of the same pixmap (or scales of
'stacked' pixmaps) will do less needless recalculation.
|
|
Once again, thanks to zeniko for pointing this out. With non-monochrome
scales, the 'stray' cases at the end of the line will loop 0 times on x.
resulting in a skewed result.
|
|
Thanks to zeniko for pointing this out. Non monochrome subsamples
would have gone wrong in the last line.
|
|
Thanks to zeniko for pointing out these places that I'd missed updating
the old code.
|
|
Move the assembly macros into fitz-internal.h.
|
|
|
|
Silly slip in my optimised code that results in failing to find
differences at the ends of lines.
|
|
|
|
to avoid clashes, especially on systems where "tolower" is declared as a
macro, for example Cygwin.
|
|
When drawing images, if they are much bigger than we need, quickly
subsample them. Makes images much more cachable, reduces time spent
in expensive smooth scaler.
|
|
When calculating the factor to use for image downscales, calculate it
as a shift rather than a divisor.
|
|
Requires android-ndk-profiler to be copied into android and android/jni.
Also requires r8c of the NDK.
|
|
A huge number of calls are made to getbit from find_changing in fax
decompression. On Android profiling shows that this accounts for 25%
of time in handling page 2 of IA3Z0845.pdf.
Rewrite code to deal with bytes at a time for speed. Profiling
now shows 5% in this function.
|
|
Same algorithm, just implemented in fixed point with a 1 place cache
and checks for trivial black/white rather than floating point.
|
|
Avoid repeated muls by reusing intermediates. Speed generation
of those intermediates by using adds/subs rather than muls.
|
|
|
|
|
|
|
|
|
|
|
|
Regenerate dirty appearance streams and report changed annotations since
last call.
Also include a partial revert of changes in 96f335bc, that turn out not
to be necessary.
fz_update_page must now be called between each document-changing event and
the next render. pdfapp.c and the android app have been updated to do so,
but do not yet take advantage of the possibility to render only the updated
areas of the screen.
|
|
|
|
Only Fade, Wipe and Blinds supported so far.
Hit 'p' in the viewer to go into 'presentation' mode. Page swaps
then transition from page to page. Pages auto advance until key
or mouse is used.
|
|
Nasty fix; an inline declaration within doc_document.c, but that's
in keeping with the current code there.
|
|
Also add a function to report whether the core has javascript support,
so that the additional features can be enabled only when the javascript
engine is present
|
|
Silly typo in LOCAL_TRIG code. Thanks to Robert Jedrzejczyk for
reporting this.
|
|
These prevented PDF 1.7 ExtensionLevel 8 encryption algorithm from
working as intended.
|
|
As zeniko points out, pointer arithmetic is pointless on a linked
list. Keep a count of the length in the list header.
|
|
Previously these were only used for shadings in test builds.
By the same argument that they are applied for shadings, it
can be argued that they ought to be applied everywhere trig
functions are used.
|
|
This reduces memory use by another 10% on the 2 testfiles mentioned
in the previous commit (see bug 693330).
|
|
Refactor 'short stopped' image stream loading into fz_compressed_buffer
loading. Nicer overall, and reflects the fact that this can be used
for non-image streams that we want to hold compressed in memory (for
instance for shading streams).
This is a preparatory step for pdfwrite, and enables further shading
memory use optimisations.
Remove unused jbig2 function pointer from the fz_compression_params
(previously fz_image_params) structure to avoid confusion.
|
|
Thanks to Sebras for pointing out our schitzophrenia here.
|
|
|
|
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
|
|
|
|
|
|
app.execDialog looks very difficult to support. Hopefully we wont have to
|
|
The name of the menu item is passed, so presumably the app could respond
to some of the possibilities.
|
|
Simple tweak, was causing problems in pdf_write.
|
|
This makes no difference to the current operation of the code, but
ensures that 'saner' values are put into the image_params structure.
This will help pdfwrite give more aesthetically pleasing output later.
|
|
|
|
|
|
Simplifies coding.
|
|
Limited testing seems to suggest that the only thing stopping the MuPDF
library building on metro seems to be the use of winsock.h.
|
|
Conflicts:
pdf/pdf_xref_aux.c
|
|
|