Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Previously, we had assumed that we'd only ever have one MuPDFActivity
running at once; this meant that we only had a single MuPDFCore, and
that it was safe to hold the native libraries state in global
variables.
Unfortunately, it seems that if you launch MuPDF from the apps list,
and open a file, then return to the home screen using 'Home' rather than
'Back', MuPDF is kept running in the background. Launching a PDF file
from a file manager then starts a new MuPDFActivity and things get
very confused.
The solution implemented here is first to move all the MuPDF global
variables into a 'globals' structure, and update the code to use
this. Next, we allocate this structure on 'openFile', and free it on
'destroying'. Finally, we return the pointer to this structure as a
java long from openFile, and store it in a private data pointer,
globals.
Each MuPDFCore native method can then retrieve the value of 'globals'
and get the global state back. This means that every MuPDFCore native
method must now be non-static (except isJavascriptSupported).
|
|
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.
|
|
Currently the scan converter advances one 'subpixel' scanline at a
time; here we update it to work in multiple subpixel scanlines at a
time.
If we spot that the gel consists of entirely vertical edges, then we
calculate the height for which those edges will remain unchanged. This
allows us to deal quickly with rectangular paths.
In the case of large vertical only edges, we can process multiple
scanlines (not just subpixel scanlines) at once.
|
|
|
|
|
|
|
|
|
|
|
|
The BOM was erroneously being emitted as a text node.
|
|
|
|
|
|
MuPDF needs access to the original file when saving, and in any case
directly overwritting the original file has much more potential for
data loss than use of a temporary file.
|
|
Missed from previous commit.
|
|
Was missed in previous commit.
|
|
|
|
|
|
|
|
New accessor xml_text() will return NULL or text content of a node.
Tag names for text nodes is the empty string "".
Fix bug 692191.
|
|
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.
|
|
By manually inserting a literal pool, we can avoid the need to
split draw_simple_scale.c out.
|
|
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.
|
|
09+20computer+20fx-fo-dx-adr-mx.pdf has a "PROJECT TITLE" field that appears
on every page, but needs setting only on one page. This commit makes that
field update correctly.
|
|
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.
|
|
|
|
A slip up in the previous whitespace fix commit removed a {. Put
it back.
|
|
|
|
No longer needed because apparently the lastest AsyncTask implementation,
that we've included from the android source, has an unbounded queue.
This wont lead to us doing unbounded renders before the one we actually
want because we cancel all but the ones we want.
|
|
We need this because only later version of AsyncTask supported
executeOnExecutor. We have one task that must not be sequentialised
with others, so we need to be able to garantee it gets its own thread
|
|
Forgot to add a new file to git.
|
|
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.
|
|
This avoids a stall, and saves time on repeated loops.
|
|
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.
|
|
|
|
|