[Pixman] [PATCH 1/2] general: Ensure that iter buffers are aligned to 16 bytes

Søren Sandmann sandmann at cs.au.dk
Thu Aug 29 13:04:33 PDT 2013


Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:

>> diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
>> index 6310bff..60566c6 100644
>> --- a/pixman/pixman-general.c
>> +++ b/pixman/pixman-general.c
>> @@ -114,7 +114,7 @@ general_composite_rect  (pixman_implementation_t *imp,
>>                           pixman_composite_info_t *info)
>>  {
>>      PIXMAN_COMPOSITE_ARGS (info);
>> -    uint64_t stack_scanline_buffer[(SCANLINE_BUFFER_LENGTH * 3 + 7) / 8];
>> +    uint8_t stack_scanline_buffer[SCANLINE_BUFFER_LENGTH];
>
> Don't know if this was intended, but the array on stack becomes ~3 times
> smaller after this change.

No, that was not intended.

> Windows and maybe some other weird systems may have 32-bit long type
> even in 64-bit mode. Using "uintptr_t" instead of "unsigned long" would
> be a safer choice.

Good point -- new patch to follow.


Søren



More information about the Pixman mailing list