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
This commit is contained in:
commit-bot@chromium.org 2014-05-15 09:46:20 +00:00
parent a1633da95d
commit 9c7fdab2f3

View File

@ -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"