Enable runtime checks for SSSE3 on x86 on Android.
$ compare-android.sh bench --match bitmap_ --repeat 30 master -> ssse3 N=30 p=0.001000 (corrected to 0.000033) sig? speedup bench n -1.16% bitmap_scale_filter_256_64 y -0.72% bitmap_8888_A_scale_bicubic y -0.21% bitmap_index8_A n -0.00% bitmap_565 n -0.00% bitmap_scale_filter_90_80 n 0.03% bitmap_8888_A_source_transparent y 0.06% bitmap_index8 y 0.30% bitmap_8888_A_source_stripes_two n 0.34% bitmap_scale_filter_80_90 y 0.42% bitmap_8888_A y 0.44% bitmap_8888_A_source_opaque n 0.53% bitmap_scale_filter_90_10 y 0.71% bitmap_8888_A_source_stripes_three y 0.91% bitmap_8888_A_scale_rotate_bicubic y 1.04% bitmap_8888_update n 1.19% bitmap_scale_filter_10_90 n 1.39% bitmap_scale_filter_90_90 y 1.77% bitmap_8888_update_volatile y 1.89% bitmap_8888 y 2.37% bitmap_scale_filter_30_90 y 9.57% bitmap_scale_filter_64_256 n 17.86% bitmap_scale_filter_90_30 y 25.40% bitmap_8888_A_scale_rotate_bilerp y 27.19% bitmap_8888_scale_rotate_bilerp y 27.23% bitmap_8888_update_scale_rotate_bilerp y 27.29% bitmap_8888_update_volatile_scale_rotate_bilerp y 55.08% bitmap_8888_A_scale_bilerp y 58.75% bitmap_8888_update_volatile_scale_bilerp y 58.90% bitmap_8888_scale_bilerp y 58.92% bitmap_8888_update_scale_bilerp Overall speedup: 10.52% BUG=skia:1111 R=djsollen@google.com Review URL: https://codereview.chromium.org/21203005 git-svn-id: http://skia.googlecode.com/svn/trunk@10474 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
55fd612adf
commit
d9d5c05b50
12
gyp/opts.gyp
12
gyp/opts.gyp
@ -33,20 +33,18 @@
|
||||
'conditions': [
|
||||
[ 'skia_arch_type == "x86" and skia_os != "ios"', {
|
||||
'conditions': [
|
||||
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]', {
|
||||
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]', {
|
||||
'cflags': [
|
||||
'-msse2',
|
||||
],
|
||||
}],
|
||||
[ 'skia_os != "android"', {
|
||||
'dependencies': [
|
||||
'opts_ssse3',
|
||||
],
|
||||
}],
|
||||
],
|
||||
'include_dirs': [
|
||||
'../include/utils',
|
||||
],
|
||||
'dependencies': [
|
||||
'opts_ssse3',
|
||||
],
|
||||
'sources': [
|
||||
'../src/opts/opts_check_SSE2.cpp',
|
||||
'../src/opts/SkBitmapProcState_opts_SSE2.cpp',
|
||||
@ -119,7 +117,7 @@
|
||||
'../src/core',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]', {
|
||||
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]', {
|
||||
'cflags': [
|
||||
'-mssse3',
|
||||
],
|
||||
|
@ -119,8 +119,6 @@ void SkBitmapProcState::platformConvolutionProcs() {
|
||||
|
||||
void SkBitmapProcState::platformProcs() {
|
||||
if (cachedHasSSSE3()) {
|
||||
#if !defined(SK_BUILD_FOR_ANDROID)
|
||||
// Disable SSSE3 optimization for Android x86
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DX) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
|
||||
@ -132,7 +130,6 @@ void SkBitmapProcState::platformProcs() {
|
||||
} else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
|
||||
fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
|
||||
}
|
||||
#endif
|
||||
} else if (cachedHasSSE2()) {
|
||||
if (fSampleProc32 == S32_opaque_D32_filter_DX) {
|
||||
fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
|
||||
|
Loading…
Reference in New Issue
Block a user