Age | Commit message (Collapse) | Author |
|
Previously this caused memory checker errors due to
a non-temporary pixmap being accidentally freed and
then later reused as expected.
|
|
|
|
|
|
Better name as not all shadings are meshes.
|
|
The implementation does not need to be in the public API.
|
|
Getting a backtrace out with missing functions makes the
backtrace much less useful. Some backtrace routines (such
as that used by Memento on Android) are incapable of
resolving static functions.
We therefore provide 2 scripts (scripts/destatic.sh and
scripts/restatic.sh) that respectively remove and replace
the 'static' from function definitions.
The scripts do not affect "static inline" or "static const"
definitions, and they are are restricted to working in the
source directory (excluding source/tools), thirdparty/mujs
and the platform/{java,android} directories.
The transformed source should NOT be checked in.
To avoid problems with clashing symbols, some functions are
renamed or tweaked slightly in this patch.
|
|
Use do {} while(--w) rather than while(w--) {} as this safes a
test each time around the loop.
|
|
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.
|
|
Shading objects are immutable and opaque once constructed.
Therefore there is no need for the const keyword.
|
|
In general, we should use 'const fz_blah' in device calls whenever
the callee should not alter the fz_blah.
Push this through. This shows up various places where we fz_keep
and fz_drop these const things.
I've updated the fz_keep and fz_drops with appropriate casts
to remove the consts. We may need to do the union dance to avoid
the consts for some compilers, but will only do that if required.
I think this is nicer overall, even allowing for the const<->no const
problems.
|
|
Purge several embedded contexts:
Remove embedded context in fz_output.
Remove embedded context in fz_stream.
Remove embedded context in fz_device.
Remove fz_rebind_stream (since it is no longer necessary).
Remove embedded context in svg_device.
Remove embedded context in XML parser.
Add ctx argument to fz_document functions.
Remove embedded context in fz_document.
Remove embedded context in pdf_document.
Remove embedded context in pdf_obj.
Make fz_page independent of fz_document in the interface.
We shouldn't need to pass the document to all functions handling a page.
If a page is tied to the source document, it's redundant; otherwise it's
just pointless.
Fix reference counting oddity in fz_new_image_from_pixmap.
|
|
|
|
Add a cached color converter mechanism. Use this for rendering meshes
to speed repeated conversions.
This reduces a (release build to ppm at default resolution) run from
23.5s to 13.2 seconds.
|
|
In the existing code for meshes, we decompose the mesh down into
quads (or triangles) and then call a process routine to actually
do the work. This process routine typically maps each vertexes
position/color and plots it.
As each vertex is used several times by neighbouring patches, this
results in each vertex being processed several times. The fix in
this commit is therefore to break the processing into 'prepare' and
'process' phases. Each vertex is 'prepared' before being used in
the 'process' phase. This cuts the number of prepare operations in
half.
In testing, this reduced the time for a (release build, generating ppm
at default resolution) run from 33.4s to 23.5s.
|
|
|