[Pixman] [PATCH 1/1] Android Runtime Detection Support For ARM NEON

Bobby Salazar bobby8934 at gmail.com
Sun Dec 11 12:29:14 PST 2011

Would you like me to make these changes then and resubmit the patch?
Or is this something you were planning on doing before you commit the

On 12/11/11, Søren Sandmann <sandmann at cs.au.dk> wrote:
> Bobby Salazar <bobby8934 at gmail.com> writes:
>> This patch adds runtime detection support for the ARM NEON fast paths
>> for code compiled with the Android NDK. This is the only code change
>> needed to enable the ARM NEON pixman fast paths for the ever growing
>> Android platform (200 million+ smartphones, tablets, etc.). Just make
>> sure to #define USE_ARM_NEON in your makefile.
> Thanks for the patch. A couple of comments:
> - I'm told that the latest version of the NDK has a __linux__ define and
>   replaces ANDROID with __ANDROID__.
>   So probably we should check for android before __linux__ and the
>   Android check should be (ANDROID || __ANDROID__).
> - All the arm_has_* variables and the pixman_have_*() routines are
>   duplicated between __linux__ and ANDROID. Maybe the Android branch
>   could be done as a subbranch of the __linux__ one?
> - Coding style:
>   - Pixman uses four space indents, and tab characters are interpreted
>     as "advance to next column which is a multiple of 8".
>   - We don't braces around single line statements. For example in this:
>> +		if (cpu_features & ANDROID_CPU_ARM_FEATURE_ARMv7)
>> +		{
>> +			arm_has_v7 = TRUE;
>> +		}
>     no braces should be used.
> Thanks,
> Soren

More information about the Pixman mailing list