Commit Graph

1147 Commits

Author SHA1 Message Date
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
Søren Sandmann Pedersen
e68f8bc118 Remove unused ACCESS macros in pixman-bits-image.c 2009-06-22 07:05:54 -04:00
Søren Sandmann Pedersen
233d8907ed Various minor changes
- Add underscores to the pixman_image_get_solid(),
  pixman_image_is_solid(), and pixman_is_opaque() names.

- A number of formatting fixes

- Move debug code to the end of pixman-private.h

- Collect all prototypes for image methods in one place
2009-06-22 06:51:04 -04:00
Søren Sandmann Pedersen
950bcd7d4a Some formatting changes 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
8b616c5725 Delete struct point 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
653fe825c9 Move region helpers into pixman-utils.c 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
00d852c969 Move code around 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
a4ef790faa Move pixman_version() to pixman.c 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
f1049c61d6 Move pixman_compute_composite_region() into pixman-utils.c 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
7690af20fc Eliminate pointless Red/Green/Blue macros 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
f6faf538ee Get rid of indexed argument to store functions 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
fdb25d9747 Move macros around in pixman-private.h 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
76bf3073d4 Move some macros into pixman-access.c 2009-06-21 22:36:15 -04:00
Søren Sandmann Pedersen
e2b5b05b38 Delete obsolete comment 2009-06-21 22:36:15 -04:00