summaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2013-12-03 17:59:42 -0500
committerSøren Sandmann <ssp@redhat.com>2013-12-03 18:14:24 -0500
commit945ab7a6f3eb6241f07e8f094dc0e647d1f10d9d (patch)
tree4aa1402b92856d70b687a93e1141a4a8ba5be78a /pixman
parent9ba3a34797399b286dbfe21c7b213a7547abf577 (diff)
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.
Diffstat (limited to 'pixman')
-rw-r--r--pixman/pixman-combine-float.c2
-rw-r--r--pixman/pixman-combine32.c2
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;