diff options
author | 2014-05-15 09:46:20 +0000 | |
---|---|---|
committer | 2014-05-15 09:46:20 +0000 | |
commit | 9c7fdab2f30549a600ed6fc2458a565c90fb4ad4 (patch) | |
tree | 05f7622de11b4fa8b662d83bbbb96249034268e7 /include | |
parent | a1633da95d50973efae4a8903fbc4fa3fdc43ee5 (diff) |
Always inline SkFloatToFixed_arm.
We have "inline" assembly for speed on ARM, but the compiler when
told to optimize for space wasn't inlining it, destroying any
possible performance improvement.
BUG=skbug:2550
R=mtklein@google.com, reed@google.com, tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/281143002
git-svn-id: http://skia.googlecode.com/svn/trunk@14745 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFixed.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/core/SkFixed.h b/include/core/SkFixed.h index b5987fc208..a16adacccf 100644 --- a/include/core/SkFixed.h +++ b/include/core/SkFixed.h @@ -107,9 +107,10 @@ static inline SkFixed SkFixedCos(SkFixed radians) { #if defined(SK_CPU_ARM) /* This guy does not handle NaN or other obscurities, but is faster than - than (int)(x*65536) + than (int)(x*65536). When built on Android with -Os, needs forcing + to inline or we lose the speed benefit. */ - inline SkFixed SkFloatToFixed_arm(float x) + SK_ALWAYS_INLINE SkFixed SkFloatToFixed_arm(float x) { int32_t y, z; asm("movs %1, %3, lsl #1 \n" |