__AVX2__ will not be defined if you omit -mavx2. Android does this
intentionally for x86 builds. (No mobile CPU supports AVX2 AFAIK.)
This should fix the Android roll.
Change-Id: Ib94c862641abc11fbb46863afc53bcc049f362ad
Reviewed-on: https://skia-review.googlesource.com/7633
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
#include <immintrin.h> // ODR safe
#include <stdint.h> // ODR safe
+#if defined(__AVX2__)
+
namespace hsw {
void convolve_vertically(const int16_t* filter, int filterLen,
convolve_vertically = hsw::convolve_vertically;
}
}
+
+#else // defined(__AVX2__) is not true...
+
+namespace SkOpts { void Init_hsw() {} }
+
+#endif