mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
sw_engine: fine-tuning RLE performance.
the arranged value is examined with the local test, improved the speed twice for a corner-case that extreamly huge size shape.
This commit is contained in:
parent
bfb7d46297
commit
46f4b8aeab
1 changed files with 2 additions and 5 deletions
|
@ -928,7 +928,7 @@ SwRleData* rleRender(SwRleData* rle, const SwOutline* outline, const SwBBox& ren
|
|||
rw.cellYCnt = rw.cellMax.y - rw.cellMin.y;
|
||||
rw.ySpan = 0;
|
||||
rw.outline = const_cast<SwOutline*>(outline);
|
||||
rw.bandSize = rw.bufferSize / (sizeof(Cell) * 8); //bandSize: 64
|
||||
rw.bandSize = rw.bufferSize / (sizeof(Cell) * 2); //bandSize: 256
|
||||
rw.bandShoot = 0;
|
||||
rw.antiAlias = antiAlias;
|
||||
|
||||
|
@ -966,10 +966,7 @@ SwRleData* rleRender(SwRleData* rle, const SwOutline* outline, const SwBBox& ren
|
|||
|
||||
if (cellMod > 0) cellStart += sizeof(Cell) - cellMod;
|
||||
|
||||
auto cellEnd = rw.bufferSize;
|
||||
cellEnd -= cellEnd % sizeof(Cell);
|
||||
|
||||
auto cellsMax = reinterpret_cast<Cell*>((char*)rw.buffer + cellEnd);
|
||||
auto cellsMax = reinterpret_cast<Cell*>((char*)rw.buffer + rw.bufferSize);
|
||||
rw.cells = reinterpret_cast<Cell*>((char*)rw.buffer + cellStart);
|
||||
|
||||
if (rw.cells >= cellsMax) goto reduce_bands;
|
||||
|
|
Loading…
Add table
Reference in a new issue