Age | Commit message (Collapse) | Author |
|
When I added transition handling to mupdf, I broke the X11
behaviour of coalescing all events and only blitting when
idle.
This commit restores that behaviour, except when transitions
are actually in progress (when it still blits instantly).
|
|
Ignore sign of font size when calculating X offset in vertical motion
for fonts.
|
|
When the store fills up, the existing code throws away items to
make room. Due to a silly oversight (not updating the 'size' after
each round of evictions) it keeps throwing away repeatedly until it
fails.
Fix that here. Should make the store more efficient.
|
|
Fix race condition in the store. When storing an item, we
immediately put it into the hash (thus getting our existence
check). We then check and try to free enough space for it in
the budget. If we cannot free enough, we remove the item
from the hash. The race condition comes if someone else finds
it in the hash in the meantime.
To fix this, we update all 'finds' of things in the hash to
move it to the head of the LRU chain (regardless of whether it
was in the chain before or not). We only remove it from the
hash in the 'failed-to-fit-in-the-budget' case if it's not in the
chain already.
Also, we fix a bug in the "failed to fit" removal case where we
were failing to realise that the the pos pointer was not valid
any more.
In the course of tracking this bug down various debug functions
were improved. These are committed here too.
|
|
Add some more consts's and use void *'s where appropriate.
|
|
JPEGs and PNGs are left unchanged. Any other image gets stored as a
PNG and sent as a data URL.
|
|
Add configuration functions to control the hints set on a given device.
Use this to set whether image data is captured or not in the text
extraction process.
Also update the display list device to respect the device hints during
playback.
|
|
Extract the core of fz_write_png so that it can work to an fz_output *
rather than a FILE *. fz_write_png continues to work as before, but now
we can output to buffer to.
|
|
|
|
Extract such records as part of the text device.
|
|
Only evaluate pkg-config variables if using system libraries,
using a := assignment in Makethird.
This silences warnings if the library is in thirdparty but not
installed on the system.
|
|
When resizing the hash table, we have a special case to cope with
someone else resizing the table before we get a chance to. In this
rare situation we were unlocking (regardless of whether we should
have been), and failing to relock. Fixed here.
When storing an item, I recently changed the code to put the new
item into the hash before ensuring that we had enough space. This
change was motivated by us wanting not to evict to make room only
to find that we didn't need the room as there was a duplicate
entry anyway.
In so doing, this opened up a potential race condition where
another thread could 'find' the item from the hash before it had
been filled out. To solve this, we move the "filling out" of the
item entries earlier in the function.
Another problem is found due to the same block of code; as soon
as a new item is put into the hash, it can be found elsewhere.
Any attempt to manipulate it's linked list will fail. We therefore
set all new items with their prev/next pointers pointing to
themselves, enabling us to spot this special case and avoid
corrupting the linked list.
|
|
Due to the underlying implementation, this probably doesn't
make a difference. But it's more aesthetically pleasing.
Most importantly, add a comment so we know what the tradeoffs are
here.
|
|
Be more consistent. No user visible changes.
|
|
As requested by customer 530.
|
|
Don't decompose meshes just to find their bbox.
|
|
V8_OK needs to be set before the includes. LOCAL_LDLIBS need to be set
after them.
|
|
fz_bound_path already takes care of stroke expansion - don't apply
it twice.
|
|
|
|
Only split as many components of colors in the tensor patch as we
actually use.
|
|
Apply the same optimisations to mesh type 6 as were just applied to
mesh type 7.
|
|
|
|
Avoid needless copies. Thanks to Christophe from customer 530 for
the original version of this patch.
Also tweak clipx and clipy so that both intersection calculations
in each rotuine are identical.
|
|
Softmasks can be applied in 2 places in our code; once when starting a
group, once when running an XObject. The two implementations had
drifted apart. To avoid this in future, pull the two together.
This solves the bug, apart from the issue of transfer functions not
working.
Also, fix another issue seen in cluster testing. For luminance smasks
the bbox is only used to clip the contents drawn - the background color
extends into the surrounding area. Fix the code to respect this.
And another problem; text in soft masks would upset text outside the
SMasks - fix this by storing/restoring the text settings in the
interpreter state around the smask rendering.
|
|
|
|
In order to be able to output images (either in the pdfwrite device or
in the html conversion), we need to be able to get to the original
compressed data stream (or else we're going to end up recompressing
images). To do that, we need to expose all of the contents of pdf_image
into fz_image, so it makes sense to just amalgamate the two.
This has knock on effects for the creation of indexed colorspaces,
requiring some of that logic to be moved.
Also, we need to make xps use the same structures; this means pushing
PNG and TIFF support into the decoding code. Also we need to be able
to load just the headers from PNG/TIFF/JPEGs as xps doesn't include
dimension/resolution information.
Also, separate out all the fz_image stuff into fitz/res_image.c rather
than having it in res_pixmap.
|
|
|
|
PDFDocEncoding for crypt revisions <= 4, UTF-8 for newer.
|
|
|
|
|
|
Previously we combined the softmask xobject->matrix with the ctm
to make gstate->softmask_ctm at load time. This meant that when
we ran the softmask xobject the xobject->matrix was reapplied a
second time.
The fix is to keep the xobject->matrix out and apply it manually
whereever we use the softmask_ctm (which is just for the bbox
transformation currently).
|
|
|
|
Otherwise loading calc.pdf and clicking buttons causes a null
pointer exception.
|
|
We have this as a local class, and the import was a hangover from
old code that stops it working on Froyo/Gingerbread.
|
|
Until someone can get me v8 libs that work on armeabi at least!
|
|
|
|
|
|
Android resolves references at class load time, so when MuPDFActivity
is loaded, it tries to resolve AnimatorInflater. This fails on a 2.2
system.
The fix is to push the code into 'SafeAnimatorInflater'. When
MuPDFActivity is loaded, SafeAnimatorInflater is resolved, but
it's not actually loaded until it's used. We never use it unless
we have at least honeycomb, hence we never try to resolve the missing
class.
|
|
The "-G gamma" entry in the usage string was different in style to
all the other entries.
|
|
|
|
|
|
Less 'pretty', but more in the style of the others.
|
|
|
|
|
|
This actually turned out to be far easier than I'd feared; remove the
explicit check that stopped this working, and ensure that we pass the
correct value in for the 'indexed' param.
Add a function to check for colorspaces being indexed. Bit nasty that
this requires a strcmp...
|
|
|
|
Thanks to Michael Weber.
|
|
Disable some features when in reflow mode
Disable features when document format prohibits
Add a few instructional on-scrren, info messages
|
|
This wont work for other than PDF documents
Also, we should save the file before printing if it has been changed
|
|
|