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

Unified Diff: src/core/SkFloat.cpp

Issue 136673002: remove remaining references to Sk64 (obsolete) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « src/core/Sk64.cpp ('k') | src/core/SkGeometry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFloat.cpp
diff --git a/src/core/SkFloat.cpp b/src/core/SkFloat.cpp
index 42194ed54506c1c88b80184087e9519a160a02a6..9ec0a7a081b33869b6c224ac05941403cd338ee8 100644
--- a/src/core/SkFloat.cpp
+++ b/src/core/SkFloat.cpp
@@ -156,15 +156,9 @@ int32_t SkFloat::Add(int32_t packed_a, int32_t packed_b)
return SkFloat::SetShift(value_a + value_b, exp - EXP_BIAS);
}
-#include "Sk64.h"
-
-static inline int32_t mul24(int32_t a, int32_t b)
-{
- Sk64 tmp;
-
- tmp.setMul(a, b);
- tmp.roundRight(24);
- return tmp.get32();
+static inline int32_t mul24(int32_t a, int32_t b) {
+ int64_t tmp = (sk_64_mul(a, b) + (1 << 23)) >> 24;
+ return sk_64_asS32(tmp);
}
int32_t SkFloat::Mul(int32_t packed_a, int32_t packed_b)
« no previous file with comments | « src/core/Sk64.cpp ('k') | src/core/SkGeometry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698