Commit b3dea58c authored by Ell's avatar Ell
Browse files

app: fix SRC_ATOP and DST_ATOP too

They can be affected by the same problem described in
commit 4c3a772c, although in the
case of SRC_ATOP, the affected pixels are always fully transparent.
parent 6853c912
......@@ -509,7 +509,7 @@ compfun_src_atop (gfloat *in,
if (mask)
layer_alpha *= *mask;
if (layer_alpha == 0.0f)
if (in[ALPHA] == 0.0f || layer_alpha == 0.0f)
{
out[RED] = in[RED];
out[GREEN] = in[GREEN];
......@@ -610,6 +610,12 @@ compfun_dst_atop (gfloat *in,
out[GREEN] = in[GREEN];
out[BLUE] = in[BLUE];
}
else if (in[ALPHA] == 0.0f)
{
out[RED] = layer[RED];
out[GREEN] = layer[GREEN];
out[BLUE] = layer[BLUE];
}
else
{
gint b;
......@@ -713,7 +719,7 @@ compfun_src_atop_sse2 (gfloat *in,
alpha = alpha * _mm_set1_ps (*mask++);
}
if (_mm_ucomigt_ss (alpha, _mm_setzero_ps ()))
if (rgba_in[ALPHA] != 0.0f && _mm_ucomineq_ss (alpha, _mm_setzero_ps ()))
{
__v4sf out_pixel, out_pixel_rbaa, out_alpha;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment