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

Unified Diff: src/core/SkMath.cpp

Issue 349663005: always use 64 bit long for fixed mul (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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/SkPostConfig.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMath.cpp
diff --git a/src/core/SkMath.cpp b/src/core/SkMath.cpp
index aeacebecd4549a57fdc1bf92fc4506e5a51ca549..f7ddc0b7275661510446d970d2128c96e868ba62 100644
--- a/src/core/SkMath.cpp
+++ b/src/core/SkMath.cpp
@@ -43,27 +43,6 @@ int SkCLZ_portable(uint32_t x) {
return zeros;
}
-SkFixed SkFixedMul_portable(SkFixed a, SkFixed b) {
-#if defined(SkLONGLONG)
- return static_cast<SkFixed>((int64_t)a * b >> 16);
-#else
- int sa = SkExtractSign(a);
- int sb = SkExtractSign(b);
- // now make them positive
- a = SkApplySign(a, sa);
- b = SkApplySign(b, sb);
-
- uint32_t ah = a >> 16;
- uint32_t al = a & 0xFFFF;
- uint32_t bh = b >> 16;
- uint32_t bl = b & 0xFFFF;
-
- uint32_t R = ah * b + al * bh + (al * bl >> 16);
-
- return SkApplySign(R, sa ^ sb);
-#endif
-}
-
///////////////////////////////////////////////////////////////////////////////
#define DIVBITS_ITER(n) \
« no previous file with comments | « include/core/SkPostConfig.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698