app: fix SRC_ATOP and DST_ATOP too
They can be affected by the same problem described in
commit 4c3a772cd8
, although in the
case of SRC_ATOP, the affected pixels are always fully transparent.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user