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

Unified Diff: src/core/SkFloatBits.cpp

Issue 483273003: remove unused SkIntToFloatCast_NoOverflowCheck (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkFloatBits.h ('k') | tests/MathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFloatBits.cpp
diff --git a/src/core/SkFloatBits.cpp b/src/core/SkFloatBits.cpp
index 6b35a75c88f72a30652c883eb598fda7cfb30a0c..8d89dfef223a3c3aef9c6ae1993a6fa2a844213e 100644
--- a/src/core/SkFloatBits.cpp
+++ b/src/core/SkFloatBits.cpp
@@ -203,23 +203,3 @@ float SkIntToFloatCast(int32_t value) {
data.fSignBitInt = (sign << 31) | (shift << 23) | (value & ~MATISSA_MAGIC_BIG);
return data.fFloat;
}
-
-float SkIntToFloatCast_NoOverflowCheck(int32_t value) {
- if (0 == value) {
- return 0;
- }
-
- int shift = EXP_BIAS;
-
- // record the sign and make value positive
- int sign = SkExtractSign(value);
- value = SkApplySign(value, sign);
-
- int zeros = SkCLZ(value << 8);
- value <<= zeros;
- shift -= zeros;
-
- SkFloatIntUnion data;
- data.fSignBitInt = (sign << 31) | (shift << 23) | (value & ~MATISSA_MAGIC_BIG);
- return data.fFloat;
-}
« no previous file with comments | « include/core/SkFloatBits.h ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698