diff options
Diffstat (limited to 'thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h')
-rw-r--r-- | thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h index cf658a6abb..090fa29a7a 100644 --- a/thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h +++ b/thirdparty/thorvg/src/lib/sw_engine/tvgSwRasterAvx.h @@ -62,7 +62,7 @@ static inline __m128i ALPHA_BLEND(__m128i c, __m128i a) } -static void avxRasterRGBA32(uint32_t *dst, uint32_t val, uint32_t offset, int32_t len) +static void avxRasterPixel32(uint32_t *dst, uint32_t val, uint32_t offset, int32_t len) { //1. calculate how many iterations we need to cover the length uint32_t iterations = len / N_32BITS_IN_256REG; @@ -89,12 +89,12 @@ static bool avxRasterTranslucentRect(SwSurface* surface, const SwBBox& region, u return false; } - auto color = surface->blender.join(r, g, b, a); + auto color = surface->join(r, g, b, a); auto buffer = surface->buf32 + (region.min.y * surface->stride) + region.min.x; auto h = static_cast<uint32_t>(region.max.y - region.min.y); auto w = static_cast<uint32_t>(region.max.x - region.min.x); - auto ialpha = 255 - static_cast<uint8_t>(_alpha(color)); + uint32_t ialpha = 255 - a; auto avxColor = _mm_set1_epi32(color); auto avxIalpha = _mm_set1_epi8(ialpha); @@ -138,7 +138,7 @@ static bool avxRasterTranslucentRle(SwSurface* surface, const SwRleData* rle, ui return false; } - auto color = surface->blender.join(r, g, b, a); + auto color = surface->join(r, g, b, a); auto span = rle->spans; uint32_t src; @@ -148,7 +148,7 @@ static bool avxRasterTranslucentRle(SwSurface* surface, const SwRleData* rle, ui if (span->coverage < 255) src = ALPHA_BLEND(color, span->coverage); else src = color; - auto ialpha = 255 - static_cast<uint8_t>(_alpha(src)); + auto ialpha = IA(src); //1. fill the not aligned memory (for 128-bit registers a 16-bytes alignment is required) auto notAligned = ((uintptr_t)dst & 0xf) / 4; |