mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
sw_engine: keep code clean.
This commit is contained in:
parent
c3a002a474
commit
0294782c77
1 changed files with 1 additions and 8 deletions
|
@ -516,14 +516,7 @@ static bool _rasterSolidRle(SwSurface* surface, const SwRleData* rle, uint8_t r,
|
|||
//8bit grayscale
|
||||
} else if (surface->channelSize == sizeof(uint8_t)) {
|
||||
for (uint32_t i = 0; i < rle->size; ++i, ++span) {
|
||||
if (span->coverage == 255) {
|
||||
_rasterGrayscale8(surface->buf8 + span->y * surface->stride, 255, span->x, span->len);
|
||||
} else {
|
||||
auto dst = &surface->buf8[span->y * surface->stride + span->x];
|
||||
for (uint32_t x = 0; x < span->len; ++x, ++dst) {
|
||||
*dst = span->coverage;
|
||||
}
|
||||
}
|
||||
_rasterGrayscale8(surface->buf8 + span->y * surface->stride, span->coverage, span->x, span->len);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue