Commit Graph

1110 Commits

Author SHA1 Message Date
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
Benjamin Otte
e3ad87033e fix ColorDodge and ColorBurn to conform to the PDF spec 2009-06-23 14:42:34 -04:00
Benjamin Otte
35bb57e723 use PDF algorithm for soft-light 2009-06-23 14:42:34 -04:00
Benjamin Otte
0735aeeaeb Add INVERT and SUBTRACT blend modes used in Flash 2009-06-23 14:42:33 -04:00
Benjamin Otte
740425ab96 use a pixman_op_t here
This improves the readability in gdb when debugging this structure
2009-06-23 14:42:33 -04:00
Benjamin Otte
94e9673eaa Add support for extended blend mode. First pass.
This adds support only for FbCombineU function.
This work is based on equations provided in SVG 1.2 specification draft.

http://www.w3.org/TR/SVG12/

Based on a previous patch by Emmanuel Pacaud <emmanuel.pacaud@free.fr>
2009-06-23 14:42:33 -04:00
Michel Dänzer
99108040f0 Fix the build on big endian machines. 2009-06-23 14:03:39 -04:00
Søren Sandmann Pedersen
bb3b3da18a Rename PIXMAN_FORMAT_16BPC macro to PIXMAN_FORMAT_IS_WIDE 2009-06-23 13:57:03 -04:00
Søren Sandmann Pedersen
039d4618f7 Write alpha map fetching with FbByteMul() instead of div_255()
Delete the div_255/div_65535 macros.
2009-06-23 13:57:03 -04:00
Søren Sandmann Pedersen
3e39b566ee Remove unused typedefs. 2009-06-23 14:00:22 -04:00
Søren Sandmann Pedersen
2c70814b6b Delete unused _pixman_image_get_fetcher() function 2009-06-22 20:43:08 -04:00
Søren Sandmann Pedersen
b3bd739447 Move accessor macros to their own header.
Also rearrange some things in pixman-private.h
2009-06-22 19:51:13 -04:00
Søren Sandmann Pedersen
fe8ef09e98 Move FbGet8() macro into pixman-bits-image.c
It is only used for bilinear filtering now. Also some formatting
changes in pixman-private.h
2009-06-22 19:38:58 -04:00
Søren Sandmann Pedersen
0358776445 Delete FbInOverC macro 2009-06-22 19:35:11 -04:00
Søren Sandmann Pedersen
1c429b4fbe Make pixman-mmx.c compile again. 2009-06-22 19:25:25 -04:00
Søren Sandmann Pedersen
7bb9df0382 Fix typo in CLIP macro. 2009-06-22 16:34:15 -04:00
Søren Sandmann Pedersen
63b050de5b Turn the FbAdd() macro into an FbIntAdd() which doesn't take a channel.
The only use of the channel argument could be written better with FbByteAdd().
2009-06-22 16:33:40 -04:00
Søren Sandmann Pedersen
026ef58328 Delete FbInU macro.
Replace uses of it with FbIntMult().
2009-06-22 16:33:30 -04:00
Søren Sandmann Pedersen
5028c1599a Use fbOver() instead of fbOver24.
fbOver() is faster anyway, and this lets us get rid of fbOverU.

Also use FbByteMul() in fbIn instead of four times FbInU.

Finally, delete FbOverC and FbInC since they weren't used.
2009-06-22 16:33:11 -04:00
Søren Sandmann Pedersen
ca4750be0a Eliminate Fetch/Store24 macros.
Replace them with inline functions in pixman-bits-image.c.
2009-06-22 08:09:11 -04:00