mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-25 07:39:02 +00:00
sw_engine: fix regression in alpha handling
revert the alpha skip condition introduced in
commit 2990e72b23
.
color values with alpha = 0 must be transformed to 0
to ensure correct intermediate composition results.
This commit is contained in:
parent
24fba7cfae
commit
ae84708f9b
1 changed files with 1 additions and 1 deletions
|
@ -1706,7 +1706,7 @@ void rasterPremultiply(RenderSurface* surface)
|
|||
for (uint32_t x = 0; x < surface->w; ++x, ++dst) {
|
||||
auto c = *dst;
|
||||
auto a = (c >> 24);
|
||||
if (a == 255 || a == 0) continue;
|
||||
if (a == 255) continue;
|
||||
*dst = (c & 0xff000000) + ((((c >> 8) & 0xff) * a) & 0xff00) + ((((c & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue