Age | Commit message (Collapse) | Author |
|
Again, mainly so profiling works nicely.
|
|
For the common cases, avoid the loop.
|
|
Profilers can't identify which of the switch arms we are in for
the inlined function calls, so rejig the code so that each of these
is a separate function.
In theory this code should be faster too, as the function 'lookup'
is only done one rather than once per line, but I don't expect this
to make a huge difference.
|
|
Use this for plotters so we can see which ones are being used
in any given build.
Build with -DTRACK_USAGE to enable.
|
|
|
|
|
|
PAM output was broken in the absence of alpha. Fixed now.
|
|
|
|
Converting a pixmap to an alpha only pixmap means "just keep
the alpha". If there IS no alpha, then a solid alpha is
assumed.
|
|
|
|
|
|
If we have alpha on the input, we preserve it. If we have no alpha
on the input, we have to create it in the output if the edges aren't
pixel aligned.
|
|
|
|
When no alpha present, we were omitting to decode the last
component.
|
|
In the absence of the source image having an alpha plane, we were
dropping the constant alpha during linear interpolated plotting.
|
|
Only do int to int copying if we have an int to copy from.
Also, when copying int to int, copy int32_t to int32_t to make
us more future proof.
|
|
|
|
|
|
|
|
Try and help C avoid pointer aliasing issues. Some of this may not
help at all. None of it should hurt though.
|
|
|
|
|
|
fz_pixmaps now have an explicit stride value. By default no change
from before, but code all copes with extra gaps at the end of the
line.
The alpha data in fz_pixmaps is no longer compulsory.
mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw).
Update halftone code to not expect alpha plane.
Update PNG writing to cope with alpha less input.
Also hide repeated params within the png output context.
ARM code needs updating.
|
|
When affine plotting with linear interpolation, we need to perform
different calculations for the texture and for the edge of the shape.
The edge of the shape needs to be calculated in exactly the same way
as for non-linear interpolated shapes.
The 'texture' position needs to be offset by 1/2 a texture unit in
each direction so that the 'pure' color is given in the middle of
the texture cells image, not in the top left corner.
To achieve these aims, we actually offset the u/v positions by 1/2
(32768, given the fixed point we are using) and adjust for this in
the boundary tests.
I have a test file that shows this working, which I will attach to
the bug, and add to the regression suite.
|
|
|
|
Add some paranoid checks to pdf_graft_object to prevent user
errors from crashing mupdf.
|
|
|
|
|
|
|
|
We had some code in draw-affine that we didn't really understand.
Change this for some code that seems more plausible.
The voodoo code was showing up problems with the plotter rework
(don't really know why), but the non-voodoo code seems happier.
|
|
|
|
|
|
Remove unnecessary extra indirect object; pdf_add_object returns
an indirect reference already, so we don't need to duplicate it.
|
|
|
|
|
|
Language bindings sometimes require objects to be reference counted.
|
|
|
|
|
|
Use comma-separated list of flags and key/value pairs, for
example: "linearize,resolution=72,colorspace=gray"
|
|
|
|
It is not used by mupdf itself and was added in commit
9915a386ea1dab21c5bbd4a0c8012dd13dbda301 to make it easier for
sumatrapdf, but sumatrapdf has stopped using the interface.
|
|
|
|
This makes it possible to redirect standard out and standard error output
streams to output streams of your liking.
This means that now you can, in gdb, type:
(gdb) call pdf_print_obj(ctx, fz_stdout(ctx), obj, 0)
(gdb) call fflush(0)
or when dealing with an unresolved indirect reference:
(gdb) call pdf_print_obj(ctx, fz_stdout(ctx), pdf_resolve_indirect(ctx, ref), 0)
(gdb) call fflush(0)
|
|
|
|
|
|
Calculations need to be done differently.
|
|
There was a race condition on bgprint.pagenum that could cause
the bgprint worker to close down early, leaving the main thread
waiting for notification of its closedown.
|
|
Add -P flag to mudraw to do 'parallel' rendering. We shift rendering
onto a background thread, so that the main thread can continue
interpreting page n+1 while page n is being rendered.
To do this, we extract the core of the drawpage routine into
'dodrawpage', and either call it directly (in the normal case)
or from a bgprint worker thread (in the parallel case).
The threading construction exactly parallels that of the threaded
band rendering. We have a semaphore to start the render process,
a semaphore to indicate when the process has stopped, and the
thread itself.
The most complex thing here is the rejigging of the printfs
required to ensure that we still get the timings displayed in a
sane way.
|
|
When decoding < 8 bpp images, we need to allow for the fact
that the data is byte aligned at the end of each row by
being careful in our calculation of r_skip.
|
|
And improve the header file commenting.
|