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/SkFloatingPoint.h

Issue 1271873002: Break LCD and Bitmap text dependency on hardcoded atlas values (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak names Created 5 years, 4 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
« no previous file with comments | « no previous file | src/gpu/GrFontAtlasSizes.h » ('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 SkFloatingPoint_DEFINED 10 #ifndef SkFloatingPoint_DEFINED
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // One step of Newton's method to refine. 151 // One step of Newton's method to refine.
152 const float32x2_t estimate_sq = vmul_f32(estimate, estimate); 152 const float32x2_t estimate_sq = vmul_f32(estimate, estimate);
153 estimate = vmul_f32(estimate, vrsqrts_f32(xx, estimate_sq)); 153 estimate = vmul_f32(estimate, vrsqrts_f32(xx, estimate_sq));
154 return vget_lane_f32(estimate, 0); // 1 will work fine too; the answer's in both places. 154 return vget_lane_f32(estimate, 0); // 1 will work fine too; the answer's in both places.
155 #else 155 #else
156 // Perhaps runtime-detected NEON, or a portable fallback. 156 // Perhaps runtime-detected NEON, or a portable fallback.
157 return SkOpts::rsqrt(x); 157 return SkOpts::rsqrt(x);
158 #endif 158 #endif
159 } 159 }
160 160
161 // This is the number of significant digits we can print in a string such that w hen we read that
162 // string back we get the floating point number we expect. The minimum value C requires is 6, but
163 // most compilers support 9
164 #ifdef FLT_DECIMAL_DIG
165 #define SK_FLT_DECIMAL_DIG FLT_DECIMAL_DIG
166 #else
167 #define SK_FLT_DECIMAL_DIG 9
161 #endif 168 #endif
169
170 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrFontAtlasSizes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698