From: Mira Grudzinska Date: Sat, 6 Feb 2021 23:01:49 +0000 (+0100) Subject: sw_engine rle: fixing clipping with non overlaping figures X-Git-Tag: accepted/tizen/unified/20210223.065502~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecefeeb9b79213ae306eaa84bf9391a1a1309b77;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git sw_engine rle: fixing clipping with non overlaping figures For clip that did not overlap with the plotted source, the whole source was plotted - the size of the rle data was not updated. --- diff --git a/src/lib/sw_engine/tvgSwRle.cpp b/src/lib/sw_engine/tvgSwRle.cpp index 352e42c..3255b6c 100644 --- a/src/lib/sw_engine/tvgSwRle.cpp +++ b/src/lib/sw_engine/tvgSwRle.cpp @@ -917,7 +917,12 @@ void rleFree(SwRleData* rle) void updateRleSpans(SwRleData *rle, SwSpan* curSpans, uint32_t size) { - if (!rle->spans || !curSpans || size == 0) return; + if (size == 0) { + rle->size = 0; + return; + } + + if (!rle->spans || !curSpans) return; rle->size = size; rle->spans = static_cast(realloc(rle->spans, rle->size * sizeof(SwSpan)));