Age | Commit message (Collapse) | Author |
|
This is faster on ARM in particular. The primary changes involve
fz_matrix, fz_rect and fz_bbox.
Rather than passing 'fz_rect r' into a function, we now consistently
pass 'const fz_rect *r'. Where a rect is passed in and modified, we
miss the 'const' off. Where possible, we return the pointer to the
modified structure to allow 'chaining' of expressions.
The basic upshot of this work is that we do far fewer copies of
rectangle/matrix structures, and all the copies we do are explicit.
This has opened the way to other optimisations, also performed in
this commit.
Rather than using expressions like:
fz_concat(fz_scale(sx, sy), fz_translate(tx, ty))
we now have fz_pre_{scale,translate,rotate} functions. These
can be implemented much more efficiently than doing the fully
fledged matrix multiplication that fz_concat requires.
We add fz_rect_{min,max} functions to return pointers to the
min/max points of a rect. These can be used to in transformations
to directly manipulate values.
With a little casting in the path transformation code we can avoid
more needless copying.
We rename fz_widget_bbox to the more consistent fz_bound_widget.
|
|
Various functions in the code output to FILE *, when there are times
we'd like them to output to other things, such as fz_buffers.
Add an fz_output type, together with fz_printf to allow things to
output to this.
|
|
|
|
libmupdf, libmupdf-v8 and libmupdf-nov8 were all calling generate.bat
resulting in occasional build failures. As the latter 2 depend on the
first, only libmupdf needs call it.
|
|
This makes searching for things much easier.
|
|
We now have a libmupdf that has all the usual files in, plus a
libmupdf-v8 and a libmupdf-nov8 with/without javascript
respectively. libmupdf-v8 and libmupdf-nov8 both depend on libmupdf,
and the apps depend on libmupdf-{no,}v8 as appropriate.
This means every file is listed (and compiled) strictly once, and
better matches the style of the unix builds. It also prevents VS
getting confused and listing files twice in search results.
Also, we strip out the unnecessary repeated calls to generate.bat,
which result in occasional spurious build failures.
|
|
Was missed in previous commit.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
jbig2dec latest
freetype 2.4.10
jpeg 9
openjpeg 1.5.0
zlib 1.2.7
Update MSVC projects for thirdparty libraries as submodules.
Improve thirdparty library availability checks in Makethird by
checking for the existence of a README file instead of just the directory,
since a checkout without active git submodules has empty directories
for the third party libraries.
|
|
The default is to embed the full font.
|
|
|
|
Make libmupdf-v8 depend on libmupdf. This dependency isn't true, but
it stops both things trying to call fontdump at the same time during
the build, which causes build failures.
|
|
Include paths for thirdparty stuff were wrong.
|
|
No idea how it seemingly worked without these changes.
|
|
Conflicts:
Makefile
apps/mudraw.c
pdf/pdf_write.c
win32/libmupdf-v8.vcproj
|
|
|
|
|
|
|
|
Previously, we've been working with a prebuild v8 lib, only available
in a single (debug) configuration.
Here, we move to reading the include files from
thirdparty/v8-3.9/include and getting the built libs from
thirdparty/v8-3.9/build/{Debug,Release}/lib/ as appropriate.
|
|
We only seem to have a debug build of the v8 build to work with at
the moment though...
|
|
Simple command line tool made from cutting all the windows specifics
out of win_main.c and adding a simple script handler in.
Read lines from the script, and feed those events to pdfapp. Screenshot
pages as required.
|
|
Conflicts:
fitz/doc_document.c
fitz/fitz-internal.h
fitz/fitz.h
fitz/stm_buffer.c
pdf/mupdf-internal.h
pdf/pdf_object.c
pdf/pdf_xobject.c
pdf/pdf_xref.c
win32/mupdf.sln
|
|
|
|
The calc.pdf specific version of pdf_jsimp is no longer needed and hence
dropped.
|
|
This also provides a way to test whether interactive methods
are supported.
|
|
Make a separate constructor function that does not link in the
interpreter, so we can save space in the mubusy binary by not
including the font and cmap resources.
|
|
|
|
|
|
|
|
|
|
|
|
Divides large format pdfs into a new pdf with multiple pages, that tile
the original PDF.
|
|
Expose pdf_write function through the document interface.
|
|
|
|
|
|
This shuts up the spurious 'overflow' warnings when outputting
pages.
|
|
|
|
I'd missed changing the openjpeg include paths to 1.5 somehow.
Fixed here.
CLUSTER_UNTESTED as we don't use the solution.
|
|
Just makefile/solution changes.
|
|
Attempt to separate public API from internal functions.
|
|
Forgot to move this earlier.
|
|
Introduce a new 'fz_image' type; this type contains rudimentary
information about images (such as native, size, colorspace etc)
and a function to call to get a pixmap of that image (with a
size hint).
Instead of passing pixmaps through the device interface (and
holding pixmaps in the display list) we now pass images instead.
The rendering routines therefore call fz_image_to_pixmap to get
pixmaps to render, and fz_pixmap_drop those afterwards.
The file format handling routines therefore need to produce
images rather than pixmaps; xps and cbz currently just wrap
pixmaps as images. PDF is more involved.
The stream handling routines in PDF have been altered so that
they can recognise when the last stream entry in a filter
dictionary is an image decoding filter. Rather than applying
this filter, they read and store the parameters into a
pdf_image_params structure, and stop decoding at that point.
This allows us to read the compressed data for an image into
memory as a block. We can then restart the image decode process
later.
pdf_images therefore consist of the compressed image data for
images. When a pixmap is requested for such an image, the code
checks to see if we have one (of an appropriate size), and if
not, decodes it.
The size hint is used to determine whether it is possible to
subsample the image; currently this is only supported for
JPEGs, but we could add generic subsampling code later.
In order to handle caching the produced images, various changes
have been made to the store and the underlying hash table.
Previously the store was indexed purely by fz_obj keys; we don't
have an fz_obj key any more, so have extended the store by adding
a concept of a key 'type'. A key type is a pointer to a set of
functions that keep/drop/compare and make a hashable key from
a key pointer.
We make a pdf_store.c file that contains functions to offer the
existing fz_obj based functions, and add a new 'type' for keys
(based on the fz_image handle, and the subsample factor) in the
pdf_image.c file.
While working on this, a problem became apparent in the existing
store codel; fz_obj objects had no protection on their reference
counts, hence an interpreter thread could try to alter a ref count
at the same time as a malloc caused an eviction from the store.
This has been solved by using the alloc lock as protection. This in
turn requires some tweaks to the code to make sure we don't try
and keep/drop fz_obj's from the store code while the alloc lock is
held.
A side effect of this work is that when a hash table is created, we
inform it what lock should be used to protect its innards (if any).
If the alloc lock is used, the insert method knows to drop/retake it
to allow it to safely expand the hash table. Callers to the hash
functions have the responsibility of taking/dropping the appropriate
lock, and ensuring that they cope with the possibility that insert
might drop the alloc lock, causing race conditions.
|
|
No other code changes.
|
|
All in one command line replacement for muxpsdraw and mupdfdraw.
|
|
File references escaped deletion in previous commit.
|
|
Rather than having a custom build step that generates the font
and cmap "generated" files, have it as a separate project.
This enables us to nuke the generated directory as part of the
clean step, and to list the files in the solution explorer.
|