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

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 2cec1536fe5925e077bf4e8dfc35a4c6c2b031a7..93d708a98babb3d6eabbc6f2629cb01058474f4e 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -184,25 +184,12 @@ void SkArithmeticMode_scalar::toString(SkString* str) const {
///////////////////////////////////////////////////////////////////////////////
static bool fitsInBits(SkScalar x, int bits) {
-#ifdef SK_SCALAR_IS_FIXED
- x = SkAbs32(x);
- x += 1 << 7;
- x >>= 8;
- return x < (1 << (bits - 1));
-#else
return SkScalarAbs(x) < (1 << (bits - 1));
-#endif
}
#if 0 // UNUSED
static int32_t toDot8(SkScalar x) {
-#ifdef SK_SCALAR_IS_FIXED
- x += 1 << 7;
- x >>= 8;
- return x;
-#else
return (int32_t)(x * 256);
-#endif
}
#endif

Powered by Google App Engine
This is Rietveld 408576698