summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-28Android: fix null exception when viewing calc.pdfPaul Gardiner
2012-11-28Remove 2 unused variables.Robin Watts
2012-11-28Android: add support for listbox and combobox form fieldsPaul Gardiner
2012-11-28Android: Allow multiple instances of MuPDF to run simultaneously.Robin Watts
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).
2012-11-27Tweak image color conversionRobin Watts
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.
2012-11-27Update scan converter to cope better with rectangular paths.Robin Watts
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.
2012-11-27android: Use custom styles for widgets.Tor Andersson
2012-11-27android: Re-enable highlight button and use tinting for button states.Tor Andersson
2012-11-27android: Use fullscreen activities for page and outline views.Tor Andersson
2012-11-27android: Update cancel icon to be the same size as the other icons.Tor Andersson
2012-11-27ios: Add xcode project temp files to .gitignore.Tor Andersson
2012-11-27Skip BOM in XML parser which was confusing the XPS parser.Tor Andersson
The BOM was erroneously being emitted as a text node.
2012-11-27Android: fix accidently swapped title and message in alert dialogPaul Gardiner
2012-11-27Android: implement saving of form dataPaul Gardiner
2012-11-27Forms: avoid directly saving to the original filePaul Gardiner
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.
2012-11-26Move xps_xml.c to base_xml.c in Android makefiles.Robin Watts
Missed from previous commit.
2012-11-26Remove xps/xps_xml.c from libmupdf-V8 VS project.Robin Watts
Was missed in previous commit.
2012-11-26Move XML parser into fitz directory.Tor Andersson
2012-11-26xps: Move XML parser into fitz namespace.Tor Andersson
2012-11-26xps: Fix potential off-by-one buffer overwrite in XML parser.Tor Andersson
2012-11-26xps: Save text content in XML nodes.Tor Andersson
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.
2012-11-26Use display list for type 3 glyphs.Tor Andersson
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.
2012-11-22Hardwire AA_BITS to 8 on android build.Robin Watts
2012-11-21Add weights caches for pixmap scaling.Robin Watts
This means that repeated scaling of the same pixmap (or scales of 'stacked' pixmaps) will do less needless recalculation.
2012-11-21Android: Move draw_simple_scale.c back into Core.mkRobin Watts
By manually inserting a literal pool, we can avoid the need to split draw_simple_scale.c out.
2012-11-21Bug 693458: Fix subscaler logic.Robin Watts
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.
2012-11-21Bug 693458: Fix calculation of pointer offset in subsampler.Robin Watts
Thanks to zeniko for pointing this out. Non monochrome subsamples would have gone wrong in the last line.
2012-11-21Bug 693458: Fix previous image subsample factor commit.Robin Watts
Thanks to zeniko for pointing out these places that I'd missed updating the old code.
2012-11-21Forms: ensure changed widgets are marked dirty rather than parent fieldPaul Gardiner
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.
2012-11-21ARM code pixmap subsampler.Robin Watts
Move the assembly macros into fitz-internal.h.
2012-11-21ARM optimised fast_cmyk_to_rgb code.Robin Watts
2012-11-21Bug 693458: Fix typo in fax decoder.Robin Watts
Silly slip in my optimised code that results in failing to find differences at the ends of lines.
2012-11-20Android: fix problem if screen timesout during alert displayPaul Gardiner
2012-11-20Fix android javascript build compile error.Robin Watts
A slip up in the previous whitespace fix commit removed a {. Put it back.
2012-11-20Obsess about whitespace.Tor Andersson
2012-11-20Android: remove SafeAsyncTaskPaul Gardiner
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.
2012-11-20Android: use AsyncTask from android sourcePaul Gardiner
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
2012-11-20Missed Core2.mk in the profiler commit.Robin Watts
Forgot to add a new file to git.
2012-11-20Rename "tolower" back to "fz_tolower"Chris Liddell
to avoid clashes, especially on systems where "tolower" is declared as a macro, for example Cygwin.
2012-11-19Add image subsampling function.Robin Watts
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.
2012-11-19Tweak image decode downscale factor internals.Robin Watts
When calculating the factor to use for image downscales, calculate it as a shift rather than a divisor.
2012-11-19Unroll inner loop of ARM version of scale_row_to_temp1.Robin Watts
This avoids a stall, and saves time on repeated loops.
2012-11-19Enable android profiler build.Robin Watts
Requires android-ndk-profiler to be copied into android and android/jni. Also requires r8c of the NDK.
2012-11-19Attempt to speed up fax decompression.Robin Watts
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.
2012-11-19Android: implement alert dialogPaul Gardiner
2012-11-19javascript fix typo in util functionPaul Gardiner
2012-11-16Implement fast_cmyk_to_rgb without calling cmyk_to_rgb.Robin Watts
Same algorithm, just implemented in fixed point with a 1 place cache and checks for trivial black/white rather than floating point.
2012-11-16Rejig cmyk_to_rgb to avoid repeated muls.Robin Watts
Avoid repeated muls by reusing intermediates. Speed generation of those intermediates by using adds/subs rather than muls.
2012-11-16Fix build with openjpeg-1.5.1Wouter van Kesteren
2012-11-16Only invert color values, not alpha, in fz_invert_pixmap_rect.Tor Andersson