Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

Commit 0ce182ec authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Set buffer size in cleared sparse images.

parent ac94b5c9
......@@ -1514,6 +1514,17 @@ void icetClearSparseImage(IceTSparseImage image)
INACTIVE_RUN_LENGTH(data) = (IceTUShort)p;
ACTIVE_RUN_LENGTH(data) = 0;
{
/* Compute the actual number of bytes used to store the image. */
IceTPointerArithmetic buffer_begin
=(IceTPointerArithmetic)ICET_IMAGE_HEADER(image);
IceTPointerArithmetic buffer_end
=(IceTPointerArithmetic)(data+RUN_LENGTH_SIZE);
IceTPointerArithmetic compressed_size = buffer_end - buffer_begin;
ICET_IMAGE_HEADER(image)[ICET_IMAGE_ACTUAL_BUFFER_SIZE_INDEX]
= (IceTInt)compressed_size;
}
}
void icetSetColorFormat(IceTEnum color_format)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment