mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine: hanndle empty clips
Generating the outline may return false, e.g., if the shape is completely trimmed. If such a shape was used as a clip, an attempt to generate 'rle' will still be made. In such a case, a crash will occur because the outline is nullptr.
This commit is contained in:
parent
572e5ef9b1
commit
c6960502eb
1 changed files with 2 additions and 0 deletions
|
@ -866,6 +866,8 @@ void _replaceClipSpan(SwRle *rle, SwSpan* clippedSpans, uint32_t size)
|
||||||
|
|
||||||
SwRle* rleRender(SwRle* rle, const SwOutline* outline, const SwBBox& renderRegion, bool antiAlias)
|
SwRle* rleRender(SwRle* rle, const SwOutline* outline, const SwBBox& renderRegion, bool antiAlias)
|
||||||
{
|
{
|
||||||
|
if (!outline) return nullptr;
|
||||||
|
|
||||||
constexpr auto RENDER_POOL_SIZE = 16384L;
|
constexpr auto RENDER_POOL_SIZE = 16384L;
|
||||||
constexpr auto BAND_SIZE = 40;
|
constexpr auto BAND_SIZE = 40;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue