summaryrefslogtreecommitdiff
path: root/fitz
AgeCommit message (Collapse)Author
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-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-26Move XML parser into fitz directory.Tor Andersson
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-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-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-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-20Obsess about whitespace.Tor Andersson
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-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-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-16Only invert color values, not alpha, in fz_invert_pixmap_rect.Tor Andersson
2012-11-16Add functions to highlight and copy text selections.Tor Andersson
2012-11-16Move text searching function into fitz.Tor Andersson
2012-11-16Add fz_write_buffer_rune to append a utf-8 character to a buffer.Tor Andersson
2012-10-29Support partial update in pdfapp.cPaul Gardiner
2012-10-29Add fz_update_pagePaul Gardiner
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.
2012-10-25Support separate rendering of the main page contents and the annotationsPaul Gardiner
2012-10-17First steps towards supporting transitions.Robin Watts
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.
2012-10-17Fix warning; pdf_js_supported not prototyped.Robin Watts
Nasty fix; an inline declaration within doc_document.c, but that's in keeping with the current code there.
2012-10-11Android Forms: pass in mouse events and handle updatingPaul Gardiner
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
2012-10-08Bug 693368: Fix typo "atin2f".Robin Watts
Silly typo in LOCAL_TRIG code. Thanks to Robert Jedrzejczyk for reporting this.
2012-10-08Fix SHA-384/-512 hash algorithm typosSebastian Rasmussen
These prevented PDF 1.7 ExtensionLevel 8 encryption algorithm from working as intended.
2012-10-05Bug 693346: Fix calculation of progress_maxRobin Watts
As zeniko points out, pointer arithmetic is pointless on a linked list. Keep a count of the length in the list header.
2012-10-05Move local implementation of trig function to internal headerSebastian Rasmussen
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.
2012-10-05Make shadings hold the data streams compressed.Robin Watts
This reduces memory use by another 10% on the 2 testfiles mentioned in the previous commit (see bug 693330).
2012-10-05Refactor compressed stream loading.Robin Watts
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.
2012-10-01Move to consistently refer to "Linear" shadings rather than "Axial" ones.Robin Watts
Thanks to Sebras for pointing out our schitzophrenia here.
2012-10-01Handle axial and radial shadings the same way as other shadings.Sebastian Rasmussen
2012-10-01Bug 693330: Change shadings to decompose to meshes at render time.Robin Watts
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
2012-09-25Forms: support doc.mailDoc.Paul Gardiner
2012-09-25Forms: handle app.launchUrl, currently by displaying a warningPaul Gardiner
2012-09-25Forms: show warning for use of app.execDialogPaul Gardiner
app.execDialog looks very difficult to support. Hopefully we wont have to
2012-09-25Forms: handle app.execMenuItem (presently just as a not-supported warning)Paul Gardiner
The name of the menu item is passed, so presumably the app could respond to some of the possibilities.
2012-09-21When we are growing an fz_buffer, ensure it doesn't stay 0 sized.Robin Watts
Simple tweak, was causing problems in pdf_write.
2012-09-21Move defaulting of image params into predictor function.Robin Watts
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.
2012-09-18Forms: add event handling api and specifically support for javascript alertPaul Gardiner
2012-09-18Forms: document event apiPaul Gardiner
2012-09-04Tweak fz_keep_stream to cope with NULL.Robin Watts
Simplifies coding.
2012-09-04Tweak to allow building on metro.Robin Watts
Limited testing seems to suggest that the only thing stopping the MuPDF library building on metro seems to be the use of winsock.h.
2012-09-04Merge branch 'master' into formsPaul Gardiner
Conflicts: pdf/pdf_xref_aux.c
2012-09-04Forms: mass renaming for the sake of consistencyPaul Gardiner