Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: include/core/SkFixed.h

Issue 18666004: ARM Skia NEON patches - 01 - Simple fixes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkColorPriv.h ('k') | src/core/SkBlitter_RGB16.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkFixed_DEFINED 10 #ifndef SkFixed_DEFINED
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 //////////////////////////////////////////////////////////////////////////////// ////////////////////// 172 //////////////////////////////////////////////////////////////////////////////// //////////////////////
173 // Now look for ASM overrides for our portable versions (should consider putting this in its own file) 173 // Now look for ASM overrides for our portable versions (should consider putting this in its own file)
174 174
175 #ifdef SkLONGLONG 175 #ifdef SkLONGLONG
176 inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b) 176 inline SkFixed SkFixedMul_longlong(SkFixed a, SkFixed b)
177 { 177 {
178 return (SkFixed)((SkLONGLONG)a * b >> 16); 178 return (SkFixed)((SkLONGLONG)a * b >> 16);
179 } 179 }
180 inline SkFract SkFractMul_longlong(SkFract a, SkFract b) 180 inline SkFract SkFractMul_longlong(SkFract a, SkFract b)
181 { 181 {
182 return (SkFixed)((SkLONGLONG)a * b >> 30); 182 return (SkFract)((SkLONGLONG)a * b >> 30);
183 } 183 }
184 inline SkFixed SkFixedSquare_longlong(SkFixed value) 184 inline SkFixed SkFixedSquare_longlong(SkFixed value)
185 { 185 {
186 return (SkFixed)((SkLONGLONG)value * value >> 16); 186 return (SkFixed)((SkLONGLONG)value * value >> 16);
187 } 187 }
188 #define SkFixedMul(a,b) SkFixedMul_longlong(a,b) 188 #define SkFixedMul(a,b) SkFixedMul_longlong(a,b)
189 #define SkFractMul(a,b) SkFractMul_longlong(a,b) 189 #define SkFractMul(a,b) SkFractMul_longlong(a,b)
190 #define SkFixedSquare(a) SkFixedSquare_longlong(a) 190 #define SkFixedSquare(a) SkFixedSquare_longlong(a)
191 #endif 191 #endif
192 192
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 #define SkFixed48ToFixed(x) ((SkFixed)((x) >> 32)) 281 #define SkFixed48ToFixed(x) ((SkFixed)((x) >> 32))
282 #define SkFloatToFixed48(x) ((SkFixed48)((x) * (65536.0f * 65536.0f * 65536. 0f))) 282 #define SkFloatToFixed48(x) ((SkFixed48)((x) * (65536.0f * 65536.0f * 65536. 0f)))
283 283
284 #ifdef SK_SCALAR_IS_FLOAT 284 #ifdef SK_SCALAR_IS_FLOAT
285 #define SkScalarToFixed48(x) SkFloatToFixed48(x) 285 #define SkScalarToFixed48(x) SkFloatToFixed48(x)
286 #else 286 #else
287 #define SkScalarToFixed48(x) SkFixedToFixed48(x) 287 #define SkScalarToFixed48(x) SkFixedToFixed48(x)
288 #endif 288 #endif
289 289
290 #endif 290 #endif
OLDNEW
« no previous file with comments | « include/core/SkColorPriv.h ('k') | src/core/SkBlitter_RGB16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698