mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
sw_engine: Fixed build errors.
This commit is contained in:
parent
ee7dc1352e
commit
09301dfde1
1 changed files with 5 additions and 4 deletions
|
@ -61,6 +61,7 @@ static inline bool neonRasterTranslucentRle(SwSurface* surface, const SwRleData*
|
||||||
else src = color;
|
else src = color;
|
||||||
|
|
||||||
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
||||||
|
auto ialpha = 255 - surface->blender.alpha(src);
|
||||||
|
|
||||||
if ((((uint32_t) dst) & 0x7) != 0) {
|
if ((((uint32_t) dst) & 0x7) != 0) {
|
||||||
//fill not aligned byte
|
//fill not aligned byte
|
||||||
|
@ -72,7 +73,6 @@ static inline bool neonRasterTranslucentRle(SwSurface* surface, const SwRleData*
|
||||||
align = 0;
|
align = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ialpha = 255 - surface->blender.alpha(src);
|
|
||||||
uint8x8_t vSrc = (uint8x8_t) vdup_n_u32(src);
|
uint8x8_t vSrc = (uint8x8_t) vdup_n_u32(src);
|
||||||
uint8x8_t vIalpha = vdup_n_u8((uint8_t) ialpha);
|
uint8x8_t vIalpha = vdup_n_u8((uint8_t) ialpha);
|
||||||
|
|
||||||
|
@ -95,8 +95,9 @@ static inline bool neonRasterTranslucentRect(SwSurface* surface, const SwBBox& r
|
||||||
auto w = static_cast<uint32_t>(region.max.x - region.min.x);
|
auto w = static_cast<uint32_t>(region.max.x - region.min.x);
|
||||||
auto ialpha = 255 - surface->blender.alpha(color);
|
auto ialpha = 255 - surface->blender.alpha(color);
|
||||||
|
|
||||||
auto vColor = static_cast<uint8x8_t>(vdup_n_u32(color));
|
auto vColor = vdup_n_u32(color);
|
||||||
auto vIalpha = static_cast<uint8x8_t>(vdup_n_u8((uint8_t) ialpha));
|
auto vIalpha = vdup_n_u8((uint8_t) ialpha);
|
||||||
|
|
||||||
uint8x8_t* vDst = nullptr;
|
uint8x8_t* vDst = nullptr;
|
||||||
uint32_t align;
|
uint32_t align;
|
||||||
|
|
||||||
|
@ -114,7 +115,7 @@ static inline bool neonRasterTranslucentRect(SwSurface* surface, const SwBBox& r
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t x = 0; x < (w - align) / 2; ++x)
|
for (uint32_t x = 0; x < (w - align) / 2; ++x)
|
||||||
vDst[x] = vadd_u8(vColor, ALPHA_BLEND_NEON(vDst[x], vIalpha));
|
vDst[x] = vadd_u8((uint8x8_t)vColor, ALPHA_BLEND_NEON(vDst[x], vIalpha));
|
||||||
|
|
||||||
auto leftovers = (w - align) % 2;
|
auto leftovers = (w - align) % 2;
|
||||||
if (leftovers > 0) dst[w - 1] = color + ALPHA_BLEND(dst[w - 1], ialpha);
|
if (leftovers > 0) dst[w - 1] = color + ALPHA_BLEND(dst[w - 1], ialpha);
|
||||||
|
|
Loading…
Add table
Reference in a new issue