mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2026-08-11 18:30:52 +00:00
Fix vmx_combine_out_ca()
It should multiply with just the destination alpha channel, not all four channels.
This commit is contained in:
parent
5191421d1f
commit
de180baba3
@ -1334,24 +1334,23 @@ vmx_combine_out_ca (pixman_implementation_t *imp,
|
||||
vector unsigned int vdest, vsrc, vmask;
|
||||
vector unsigned char tmp1, tmp2, tmp3, tmp4, edges,
|
||||
dest_mask, mask_mask, src_mask, store_mask;
|
||||
|
||||
|
||||
COMPUTE_SHIFT_MASKC (dest, src, mask);
|
||||
|
||||
|
||||
/* printf ("%s\n",__PRETTY_FUNCTION__); */
|
||||
for (i = width / 4; i > 0; i--)
|
||||
{
|
||||
|
||||
LOAD_VECTORSC (dest, src, mask);
|
||||
|
||||
|
||||
vdest = pix_multiply (pix_multiply (vsrc, vmask), splat_alpha (vdest));
|
||||
|
||||
|
||||
STORE_VECTOR (dest);
|
||||
|
||||
|
||||
src += 4;
|
||||
dest += 4;
|
||||
mask += 4;
|
||||
}
|
||||
|
||||
|
||||
for (i = width % 4; --i >= 0;)
|
||||
{
|
||||
uint32_t a = mask[i];
|
||||
@ -1359,7 +1358,7 @@ vmx_combine_out_ca (pixman_implementation_t *imp,
|
||||
uint32_t d = dest[i];
|
||||
uint32_t da = ALPHA_8 (~d);
|
||||
UN8x4_MUL_UN8x4 (s, a);
|
||||
UN8x4_MUL_UN8x4 (s, da);
|
||||
UN8x4_MUL_UN8 (s, da);
|
||||
dest[i] = s;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user