Age | Commit message (Collapse) | Author |
|
|
|
We were passing in the wrong source alpha value in one of the
plotter calls. This is not a call used in our standard builds,
hence us not having seen the problem before.
Credit to Sebastian for spotting the problem and suggesting the
fix.
|
|
Should be 0..256 not 0..1
|
|
|
|
Non rectangular clips are currently handled by rendering to a
'isolated' background, and then plotting that through a mask.
This runs into problems when the rendering needs to use non
standard blend modes that need to access the background
colors.
Instead, copy the background to the new pixmap, render to that
then plot that through the mask.
This simplifies the painting code, because we now never have
mismatched source and destination alphas.
|
|
Slightly revised blending, making use of the fact that we can
no longer overflow due to ma + masa <= 0x100.
|
|
|
|
As part of the blending calculations, we do:
dst = src * mask_alpha + dst * (1-mask_alpha.src_alpha)
We calculate mask_alpha as ma, and 1-mask_alpha.src_alpha as masa.
In full accuracy, we should never have ma + masa >= 1.
Unfortunately, with the formulation used in the painters at the
moment, we can. We therefore rejig the calculations slightly.
|
|
Used for the file from bug 697122. Makes a small improvement
overall. (31.3s to 31s for a cutdown file).
The equivalent code using 64bit operations is slower.
|
|
|
|
If we have a source alpha, and it's 0, then nothing to paint.
|
|
Spotted with:
mutool draw -A0 -r600 -o out.ppm J11_acrobat.pdf
|
|
Short circuit any attempt to paint a pixmap with zero alpha.
|
|
|
|
In C we can't have a label as the only thing in a block.
|
|
|
|
Introduce FZ_PLOTTER defines to set which defines we required.
Add FZ_ENABLE define to set which document handlers are built
by default.
|
|
|
|
Use do {} while(--w) rather than while(w--) {} as this safes a
test each time around the loop.
|
|
|
|
Again, mainly so profiling works nicely.
|
|
Use this for plotters so we can see which ones are being used
in any given build.
Build with -DTRACK_USAGE to enable.
|
|
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.
|
|
|
|
|
|
|
|
|
|
To avoid having to duplicate a fairly large block of code several
times, use repeated inclusion of a header with some macros to
generate optimised glyph plotters.
|
|
We have optimised plotters for 2 and 4 components (i.e. greyscale
and rgb). Add equivalent ones for CMYK.
|
|
Rather than generating fz_pixmaps for glyphs, we generate fz_glyphs.
fz_glyphs can either contain a pixmap, or an RLEd representation
(if it's a mask, and it's smaller).
Should take less memory in the cache, and should be faster to plot.
|
|
Broken in recent optimisations.
|
|
|
|
If we want the alternative versions we can pull them out of git
later.
|
|
The 2 biggest hotspots in benchmarking on the Raspberry pi at
1200dpi.
|
|
|