From 945ab7a6f3eb6241f07e8f094dc0e647d1f10d9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann?= Date: Tue, 3 Dec 2013 17:59:42 -0500 Subject: [PATCH] Soft Light: The first comparison should be <=, not < 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; -- 2.7.4