there are a logical wrong that memory increase size,
it correct that also tune the number to reduce memory allocation time.
Now scene transform test works smoothly.
Change-Id: If0674e33426d794546801a96ad9de711b5de0dcd
/* alloc is required to prevent free and reallocation */
/* when the rle needs to be regenerated because of attribute change. */
if (rle->alloc < newSize) {
- rle->spans = static_cast<SwSpan*>(realloc(rle->spans, (count + rle->size) << 2 * sizeof(SwSpan)));
+ rle->alloc = (newSize * 2);
+ rle->spans = static_cast<SwSpan*>(realloc(rle->spans, rle->alloc * sizeof(SwSpan)));
assert(rle->spans);
- rle->alloc = rle->size + (count << 2);
}
//copy the new spans to the allocated memory