[Pixman] [PATCH] Soft Light: The first comparison should be <=, not <
Søren Sandmann
sandmann at cs.au.dk
Tue Dec 3 15:03:25 PST 2013
According to the definition of soft light, the first comparison is
less-than-or-equal, not less-than.
---
pixman/pixman-combine-float.c | 2 +-
pixman/pixman-combine32.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pixman/pixman-combine-float.c b/pixman/pixman-combine-float.c
index 5ea739f..e9aab48 100644
--- a/pixman/pixman-combine-float.c
+++ b/pixman/pixman-combine-float.c
@@ -438,7 +438,7 @@ blend_hard_light (float sa, float s, float da, float d)
static force_inline float
blend_soft_light (float sa, float s, float da, float d)
{
- if (2 * s < sa)
+ if (2 * s <= sa)
{
if (FLOAT_IS_ZERO (da))
return d * sa;
diff --git a/pixman/pixman-combine32.c b/pixman/pixman-combine32.c
index 450114a..44ca7e8 100644
--- a/pixman/pixman-combine32.c
+++ b/pixman/pixman-combine32.c
@@ -848,7 +848,7 @@ blend_soft_light (uint32_t d_org,
double as = as_org * (1.0 / MASK);
double r;
- if (2 * s < as)
+ if (2 * s <= as)
{
if (ad == 0)
r = d * as;
--
1.8.3.1
More information about the Pixman
mailing list