skia2/include
digit@google.com eec9dbcace arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.

- Add include/core/SkUtilsArm.h, which declares a few helper
  macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
  function 'sk_cpu_arm_has_neon()' which returns true if
  the target CPU supports the ARM NEON instruction set.

  Note that the header is in include/core/ because it will
  have to be included from NEON-specific code under src/code/

  It would probably be more logical to put it under include/opts/
  instead, but this would require moving all the NEON-specific
  stuff under src/code/ into src/opts/, which is not trivial
  due to the way the code is currently architected.

- Add src/core/SkUtilsArm.cpp which implements
  'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
  when SK_NEON_ARM_IS_DYNAMIC is true.

  (For other cases, 'sk_cpu_arm_has_neon' is an inline function
   that returns a constant 'true' or 'false' value).

  There is no user-level accessible CPUID instruction on ARM,
  so do all CPU feature probing by parsing /proc/cpuinfo.
  This is Linux-specific.

  For Debug build types, the CPU probing result is printed
  to the Android log (or Linux command-line) for easier
  debugging.

- Create a new 'opts_neon' target (static library) which shall
  contain all the NEON-specific code paths for the library.

  This is necessary because -mfpu=neon impacts also non-scalar
  code. Just like with -mssse3 on x86, we can't build the rest
  of the library with this flag.

  Note that for now, we only include memset16_neon and
  memset32_neon in this library.

- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
  properly.

Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058

git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +00:00
..
animator Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
config Add SK_SYSTEM_ZLIB define. 2012-04-16 19:10:21 +00:00
core arm: First step towards dynamic NEON support. 2012-05-30 13:54:41 +00:00
device/xps Formatting cleanup: remove extra whitespace 2012-01-28 01:45:11 +00:00
effects Change patheffect to take a (new) StrokeRec object, which encapsulates the fill 2012-05-25 01:04:12 +00:00
gpu Fix line ending, mark svn:eol-style LF 2012-05-29 19:44:14 +00:00
images Cleanup code related to SkFlattenable::flatten() 2012-03-29 15:18:04 +00:00
pdf [PDF] Move most of the headers to be private. 2012-03-22 20:45:15 +00:00
pipe undef Status to undo the evil that XLib.h has done 2011-08-12 14:49:55 +00:00
ports Add CreateFallbackForScript to SkTypeface for Android. 2012-03-15 15:49:51 +00:00
svg Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
text Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
utils Add device to top level N-way canvas. 2012-05-01 16:50:25 +00:00
views Add MSAA option to SampleApp 2012-04-06 20:13:38 +00:00
xml Make SkMath.h less visible in public header files. 2011-09-27 17:38:17 +00:00