зеркало из https://github.com/mozilla/moz-skia.git
Add ARM optimizations to the build.
Also had to fix a problem in the ARM memset code that was causing some tests and bench to fail. Review URL: http://codereview.appspot.com/5522052 git-svn-id: http://skia.googlecode.com/svn/trunk@2989 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
e8c984d11a
Коммит
a44e6c6b53
|
@ -148,8 +148,6 @@
|
|||
'../src/core/SkWriter32.cpp',
|
||||
'../src/core/SkXfermode.cpp',
|
||||
|
||||
'../src/opts/opts_check_SSE2.cpp',
|
||||
|
||||
'../include/core/Sk64.h',
|
||||
'../include/core/SkAdvancedTypefaceMetrics.h',
|
||||
'../include/core/SkAutoKern.h',
|
||||
|
@ -302,9 +300,6 @@
|
|||
],
|
||||
}],
|
||||
[ 'skia_os == "android"', {
|
||||
'sources!': [
|
||||
'../src/opts/opts_check_SSE2.cpp',
|
||||
],
|
||||
'dependencies': [
|
||||
'android_system.gyp:ft2',
|
||||
],
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
'../include/config',
|
||||
'../include/core',
|
||||
'../src/core',
|
||||
'../src/opts',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
|
||||
|
@ -37,6 +38,7 @@
|
|||
}],
|
||||
[ 'skia_target_arch != "arm"', {
|
||||
'sources': [
|
||||
'../src/opts/opts_check_SSE2.cpp',
|
||||
'../src/opts/SkBitmapProcState_opts_SSE2.cpp',
|
||||
'../src/opts/SkBlitRow_opts_SSE2.cpp',
|
||||
'../src/opts/SkUtils_opts_SSE2.cpp',
|
||||
|
@ -52,9 +54,12 @@
|
|||
'-fomit-frame-pointer',
|
||||
],
|
||||
'sources': [
|
||||
'../src/opts/opts_check_arm.cpp',
|
||||
'../src/opts/memset.arm.S',
|
||||
'../src/opts/memset16_neon.S',
|
||||
'../src/opts/memset32_neon.S',
|
||||
'../src/opts/SkBitmapProcState_opts_arm.cpp',
|
||||
'../src/opts/SkBlitRow_opts_arm.cpp',
|
||||
'../src/opts/SkUtils_opts_none.cpp',
|
||||
],
|
||||
}],
|
||||
[ 'skia_target_arch == "arm" and armv7 != 1', {
|
||||
|
|
|
@ -32,13 +32,6 @@ void sk_memset32_portable(uint32_t dst[], uint32_t value, int count);
|
|||
typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count);
|
||||
SkMemset32Proc SkMemset32GetPlatformProc();
|
||||
|
||||
#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK)
|
||||
#include "cutils/memory.h"
|
||||
|
||||
#define sk_memset16(dst, value, count) android_memset16(dst, value, (count) << 1)
|
||||
#define sk_memset32(dst, value, count) android_memset32(dst, value, (count) << 2)
|
||||
#endif
|
||||
|
||||
#ifndef sk_memset16
|
||||
extern SkMemset16Proc sk_memset16;
|
||||
#endif
|
||||
|
|
|
@ -108,7 +108,6 @@ void sk_memset32_portable(uint32_t dst[], uint32_t value, int count) {
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_ANDROID_NDK)
|
||||
static void sk_memset16_stub(uint16_t dst[], uint16_t value, int count) {
|
||||
SkMemset16Proc proc = SkMemset16GetPlatformProc();
|
||||
sk_memset16 = proc ? proc : sk_memset16_portable;
|
||||
|
@ -125,8 +124,6 @@ static void sk_memset32_stub(uint32_t dst[], uint32_t value, int count) {
|
|||
|
||||
SkMemset32Proc sk_memset32 = sk_memset32_stub;
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* 0xxxxxxx 1 total
|
||||
|
|
|
@ -32,6 +32,10 @@ arm_memset16:
|
|||
.fnstart
|
||||
push {lr}
|
||||
|
||||
/* Multiply count by 2 - go from the number of 16-bit shorts
|
||||
* to the number of bytes desired. */
|
||||
mov r2, r2, lsl #1
|
||||
|
||||
/* expand the data to 32 bits */
|
||||
orr r1, r1, lsl #16
|
||||
|
||||
|
@ -40,10 +44,6 @@ arm_memset16:
|
|||
strneh r1, [r0], #2
|
||||
subne r2, r2, #2
|
||||
|
||||
/* Multiply count by 2 - go from the number of 16-bit shorts
|
||||
* to the number of bytes desired. */
|
||||
mov r2, r2, lsl #1
|
||||
|
||||
/* Now jump into the main loop below. */
|
||||
b .Lwork_32
|
||||
.fnend
|
||||
|
|
Загрузка…
Ссылка в новой задаче