Commit Graph

1929 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
d3bebaf731 Rename fetchProc32 to fetch_scanline_t and fetch_pixels_32_t to fetch_pixels_t 2009-06-24 12:37:47 -04:00
Søren Sandmann Pedersen
6af8672c69 Get rid of the 64 bit fetcher types.
It's simpler to just declare everything as 32 bit fetchers and do the
conversion in the few functions that actually need to know the size of
the pixel type.
2009-06-24 12:37:47 -04:00
Søren Sandmann Pedersen
70cba5cfa8 Consolidate the three scanline store types into one.
The 64 bit storers do their own type conversion.
2009-06-24 12:37:47 -04:00
Søren Sandmann Pedersen
973ebf1631 Get rid of remaining scanFetchProc casts 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
24303475c2 Get rid of scanFetchProc casts in pixman-radial-gradient.c 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
99780d3b22 Get rid of scanFetchProc casts in pixman-conical-gradient.c 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
2d2d3a2625 Get rid of casts to scanFetchProc in pixman-bits-image.c
Instead just declare the functions with the required type and do any
type conversions in the function itself.
2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
4597ad88d9 Fix bug where 64 bit pixel were fetched as 32 bit ones. 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
aa6adb646a Delete FbIntMult and FbIntDiv macros, and move FbIntAdd to pixman-combine.h 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
53ada03119 Add a table to oob-test so that it can test more than one setup. 2009-06-24 12:33:26 -04:00
Søren Sandmann Pedersen
895a8da633 Fix offset bug in pixman_run_fast_path().
Fast paths should only run when the source images complete cover the
composite region, because otherwise they would be required to sample
the border, and fast paths generally don't know how to do that.

The check for this did not work right because it didn't take the
offset generated by the composite coordinates into account. This
commits fixes that by adding (x, y) coordinates to image cover
indicating the new position of the source in destination coordinates.

Based on this we now compare against the region extents which are
already in destination coordinates.
2009-06-24 12:30:45 -04:00
Søren Sandmann Pedersen
fd90429a32 Fix typo in oob-test.c 2009-06-24 11:24:11 -04:00
Søren Sandmann Pedersen
bed9c378ff Add test case for out-of-bounds memory access. 2009-06-24 10:37:07 -04:00
Søren Sandmann Pedersen
b6c97ae2c9 Fix comment in pixman-utils to have the right sense. 2009-06-24 09:05:55 -04:00
Søren Sandmann Pedersen
c0047fbfd5 Subtract x_off/y_off before conversion to integer.
They are fixed-point values, not integers.

Bug 22437, reported by Michel Dänzer.
2009-06-23 16:58:32 -04:00
Søren Sandmann Pedersen
905856f43d Add convolution-test.c program 2009-06-23 16:37:35 -04:00
Søren Sandmann Pedersen
79d397003f Delete leftover use of PIXMAN_OP_FLASH_SUBTRACT 2009-06-23 16:23:26 -04:00
Søren Sandmann Pedersen
ebc4a4df9c Remove support for component alpha with HSL blend modes.
It isn't clear that component alpha makes sense with HSL blend modes.
2009-06-23 14:55:36 -04:00
Søren Sandmann Pedersen
ca4ff13027 Remove FLASH_SUBTRACT blend mode.
We may resurrect it later, but leave it out for now, as the closest
thing we have to a spec:

http://www.kaourantin.net/2005/09/some-word-on-blend-modes-in-flash.html

claims that alpha values should be subtracted, whereas real-world flash
files indicate that they shouldn't.
2009-06-23 14:45:28 -04:00
Carlos Garcia Campos
5dab62a2f9 Fix BlendColorBurn
It should return 0 when sa == 0
2009-06-23 14:42:37 -04:00
Søren Sandmann Pedersen
e3a94e8928 Add screen-test.c test program 2009-06-23 14:42:37 -04:00
Søren Sandmann Pedersen
16873f6d1b Make the composite test window bigger by default.
Also rearrange the squares to better match typical aspect ratios.
2009-06-23 14:42:37 -04:00
Carlos Garcia Campos
eb4fd0477a Use floating point in SetLum 2009-06-23 14:42:37 -04:00
Carlos Garcia Campos
96d5044c0c Do not use combineMask in component-alpha functions 2009-06-23 14:42:37 -04:00
Carlos Garcia Campos
bf356c6d8c Fix typo 2009-06-23 14:42:37 -04:00
Carlos Garcia Campos
cdae71ee85 [TEST] Update composite-test to test more operators 2009-06-23 14:42:36 -04:00
Søren Sandmann Pedersen
c35685255f Fix ColorDodge and ColorBurn to conform to the spec 2009-06-23 14:42:36 -04:00
Søren Sandmann Pedersen
49a4fc0969 Remove optimizations that I'm not convinced are correct 2009-06-23 14:42:36 -04:00
Søren Sandmann Pedersen
3fb71f8b41 Fix some more problems in MultiplyC 2009-06-23 14:42:36 -04:00
Søren Sandmann Pedersen
254e62159b Fix various problems in FbCombineMultiplyC
Don't read the destination unless we have to.  fbByteMulAddC()
produces its result in its first argument, not its last.
2009-06-23 14:42:35 -04:00
Søren Sandmann Pedersen
a158d7f14f Add some comments about the linearity of the non-separable blend modes 2009-06-23 14:42:35 -04:00
Benjamin Otte
cae5062d3b fix component-alpha versions to set source to 0 when mask is 0 2009-06-23 14:42:35 -04:00
Benjamin Otte
9df72ebdb8 remove debugging leftovers 2009-06-23 14:42:35 -04:00
Benjamin Otte
19aae37bfb correct subtract implementation 2009-06-23 14:42:35 -04:00
Benjamin Otte
f130d99c94 fix Multiply component-alpha version 2009-06-23 14:42:35 -04:00
Benjamin Otte
4bb1eac4e7 fix comment 2009-06-23 14:42:35 -04:00
Benjamin Otte
73810b320e fix component-alpha versions for seperable blend modes 2009-06-23 14:42:35 -04:00
Benjamin Otte
4b921c1d91 rename operator SUBTRACT to FLASH_SUBTRACT
Also document it and move it out of the PDF blend modes to make clear
that it is not in any way related to PDF.
2009-06-23 14:42:35 -04:00
Benjamin Otte
7cbfe3ba21 rework blend-mode documentation to match current code better 2009-06-23 14:42:35 -04:00
Benjamin Otte
f26c9ec438 typo fix: Seperable => Separable 2009-06-23 14:42:35 -04:00
Benjamin Otte
ea17e2e2e4 remove semicolon at end of macro 2009-06-23 14:42:35 -04:00
Benjamin Otte
ecf9f83ac6 remove a leftover debugging statement
That was an assertion check by infinite loop
2009-06-23 14:42:34 -04:00
Benjamin Otte
c061b4dd16 invent a Subtract operator for component alpha
This seems to make sense, and as I can't test it against Adobe's Flash
player as that one can't do component alpha, this one looks best.
2009-06-23 14:42:34 -04:00
Benjamin Otte
93e32235e6 add non-seperable versions for component alpha 2009-06-23 14:42:34 -04:00
Benjamin Otte
239cc46aa7 add component-alpha versions of the seperable blend-modes 2009-06-23 14:42:34 -04:00
Benjamin Otte
2f57b6f4e9 rewrite nonseperable blend modes the same way as seperable ones 2009-06-23 14:42:34 -04:00
Benjamin Otte
fd1bec2859 clean up seperable blend modes
The code is now shorter and faster than before
2009-06-23 14:42:34 -04:00
Benjamin Otte
e8b4394a40 prefix HSL operators with HSL
This is necessary to distinguish SATURATE from PDF's HSL SATURATION
2009-06-23 14:42:34 -04:00
Benjamin Otte
f08263a251 remove invert operator
src INVERT dest == (white IN src) DIFFERENCE dest
2009-06-23 14:42:34 -04:00
Benjamin Otte
755638d73c add nonseperable blend modes from PDF spec 2009-06-23 14:42:34 -04:00