sw_engine: fix masked translucent rect

This commit is contained in:
Mira Grudzinska 2024-07-09 15:23:05 +02:00 committed by Hermet Park
parent 69b1fb8208
commit ebfdf2102e

View file

@ -383,7 +383,8 @@ static bool _rasterMattedRect(SwSurface* surface, const SwBBox& region, uint8_t
auto dst = &buffer[y * surface->stride];
auto cmp = &cbuffer[y * surface->compositor->image.stride * csize];
for (uint32_t x = 0; x < w; ++x, ++dst, cmp += csize) {
*dst = INTERPOLATE(color, *dst, alpha(cmp));
auto tmp = ALPHA_BLEND(color, alpha(cmp));
*dst = tmp + ALPHA_BLEND(*dst, IA(tmp));
}
}
//8bits grayscale