aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-11 21:21:26 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-11 21:21:26 +0000
commit7886ad3de1aa523d5c71f1fa9f355dfcb2412d1d (patch)
tree592ef48bd8dbfbdfe72fa5721fe5527fc9442d9b /src
parenta0116d541d6fee722cc159b99de6867c9ee379a5 (diff)
remove SK_CAN_USE_FLOAT (deprecated)
git-svn-id: http://skia.googlecode.com/svn/trunk@4232 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/animator/SkAnimateBase.cpp4
-rw-r--r--src/animator/SkAnimateField.cpp10
-rw-r--r--src/animator/SkAnimateSet.cpp4
-rw-r--r--src/animator/SkDisplayEvent.cpp4
-rw-r--r--src/animator/SkDisplayPost.cpp8
-rw-r--r--src/animator/SkDisplayRandom.cpp6
-rw-r--r--src/animator/SkDisplayType.h4
-rw-r--r--src/animator/SkDisplayTypes.cpp4
-rw-r--r--src/animator/SkDisplayable.cpp16
-rw-r--r--src/animator/SkScript.cpp18
-rw-r--r--src/animator/SkScriptDecompile.cpp4
-rw-r--r--src/animator/SkScriptTokenizer.cpp14
-rw-r--r--src/core/SkCordic.cpp6
-rw-r--r--src/core/SkEdge.h4
-rw-r--r--src/core/SkFloat.cpp6
-rw-r--r--src/core/SkFloatBits.cpp3
-rw-r--r--src/core/SkMatrix.cpp6
-rw-r--r--src/core/SkPath.cpp19
-rw-r--r--src/core/SkString.cpp2
19 files changed, 7 insertions, 135 deletions
diff --git a/src/animator/SkAnimateBase.cpp b/src/animator/SkAnimateBase.cpp
index 2c9e862d16..fe3815d75d 100644
--- a/src/animator/SkAnimateBase.cpp
+++ b/src/animator/SkAnimateBase.cpp
@@ -91,11 +91,7 @@ void SkAnimateBase::dump(SkAnimateMaker* maker) {
SkDebugf("to=\"%s\" ", to.c_str());
}
if (begin != 0) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("begin=\"%g\" ", SkScalarToFloat(SkScalarDiv(begin,1000)));
-#else
- SkDebugf("begin=\"%x\" ", SkScalarDiv(begin,1000));
-#endif
}
}
#endif
diff --git a/src/animator/SkAnimateField.cpp b/src/animator/SkAnimateField.cpp
index ac96bbc520..65e084a0a5 100644
--- a/src/animator/SkAnimateField.cpp
+++ b/src/animator/SkAnimateField.cpp
@@ -41,15 +41,9 @@ void SkAnimate::dump(SkAnimateMaker* maker) {
SkDebugf("mirror=\"true\" ");
if (fReset)
SkDebugf("reset=\"true\" ");
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("dur=\"%g\" ", SkScalarToFloat(SkScalarDiv(dur,1000)));
if (repeat != SK_Scalar1)
SkDebugf("repeat=\"%g\" ", SkScalarToFloat(repeat));
-#else
- SkDebugf("dur=\"%x\" ", SkScalarDiv(dur,1000));
- if (repeat != SK_Scalar1)
- SkDebugf("repeat=\"%x\" ", repeat);
-#endif
//if (fHasValues)
// SkDebugf("values=\"%s\" ", values);
if (blend.count() != 1 || blend[0] != SK_Scalar1) {
@@ -59,11 +53,7 @@ void SkAnimate::dump(SkAnimateMaker* maker) {
if (!firstElem)
SkDebugf(",");
firstElem = false;
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("%g", SkScalarToFloat(blend[i]));
-#else
- SkDebugf("%x", blend[i]);
-#endif
}
SkDebugf("]\" ");
}
diff --git a/src/animator/SkAnimateSet.cpp b/src/animator/SkAnimateSet.cpp
index d0b4dfc60c..3dd9648afa 100644
--- a/src/animator/SkAnimateSet.cpp
+++ b/src/animator/SkAnimateSet.cpp
@@ -39,11 +39,7 @@ SkSet::SkSet() {
void SkSet::dump(SkAnimateMaker* maker) {
INHERITED::dump(maker);
if (dur != 1) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("dur=\"%g\" ", SkScalarToFloat(SkScalarDiv(dur,1000)));
-#else
- SkDebugf("dur=\"%x\" ", SkScalarDiv(dur,1000));
-#endif
}
//don't want double />\n's
SkDebugf("/>\n");
diff --git a/src/animator/SkDisplayEvent.cpp b/src/animator/SkDisplayEvent.cpp
index 7d2e786092..0eb956a361 100644
--- a/src/animator/SkDisplayEvent.cpp
+++ b/src/animator/SkDisplayEvent.cpp
@@ -104,11 +104,7 @@ void SkDisplayEvent::dumpEvent(SkAnimateMaker* maker) {
SkDebugf("target=\"%s\" ", fTarget->id);
}
if (kind >= SkDisplayEvent::kMouseDown && kind <= SkDisplayEvent::kMouseUp) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("x=\"%g\" y=\"%g\" ", SkScalarToFloat(x), SkScalarToFloat(y));
-#else
- SkDebugf("x=\"%x\" y=\"%x\" ", x, y);
-#endif
}
if (disable)
SkDebugf("disable=\"true\" ");
diff --git a/src/animator/SkDisplayPost.cpp b/src/animator/SkDisplayPost.cpp
index 8283a9cf0b..bf89055c28 100644
--- a/src/animator/SkDisplayPost.cpp
+++ b/src/animator/SkDisplayPost.cpp
@@ -76,11 +76,7 @@ void SkPost::dump(SkAnimateMaker* maker) {
delete eventType;
if (delay > 0) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("delay=\"%g\" ", SkScalarToFloat(SkScalarDiv(delay, 1000)));
-#else
- SkDebugf("delay=\"%x\" ", SkScalarDiv(delay, 1000));
-#endif
}
// if (initialized == false)
// SkDebugf("(uninitialized) ");
@@ -131,11 +127,7 @@ void SkPost::dump(SkAnimateMaker* maker) {
case SkMetaData::kScalar_Type: {
SkScalar scalar;
meta.findScalar(name, &scalar);
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("float=\"%g\" ", SkScalarToFloat(scalar));
-#else
- SkDebugf("float=\"%x\" ", scalar);
-#endif
} break;
case SkMetaData::kString_Type:
SkDebugf("string=\"%s\" ", meta.findString(name));
diff --git a/src/animator/SkDisplayRandom.cpp b/src/animator/SkDisplayRandom.cpp
index ac6c3a13ed..3f77fcb03c 100644
--- a/src/animator/SkDisplayRandom.cpp
+++ b/src/animator/SkDisplayRandom.cpp
@@ -35,15 +35,9 @@ SkDisplayRandom::SkDisplayRandom() : blend(0), min(0), max(SK_Scalar1) {
#ifdef SK_DUMP_ENABLED
void SkDisplayRandom::dump(SkAnimateMaker* maker) {
dumpBase(maker);
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("min=\"%g\" ", SkScalarToFloat(min));
SkDebugf("max=\"%g\" ", SkScalarToFloat(max));
SkDebugf("blend=\"%g\" ", SkScalarToFloat(blend));
-#else
- SkDebugf("min=\"%x\" ", min);
- SkDebugf("max=\"%x\" ", max);
- SkDebugf("blend=\"%x\" ", blend);
-#endif
SkDebugf("/>\n");
}
#endif
diff --git a/src/animator/SkDisplayType.h b/src/animator/SkDisplayType.h
index fe82b319c2..dcbf5d406c 100644
--- a/src/animator/SkDisplayType.h
+++ b/src/animator/SkDisplayType.h
@@ -14,9 +14,7 @@
#include "SkScalar.h"
#ifdef SK_DEBUG
- #ifdef SK_CAN_USE_FLOAT
- #define SK_DUMP_ENABLED
- #endif
+ #define SK_DUMP_ENABLED
#ifdef SK_BUILD_FOR_MAC
#define SK_FIND_LEAKS
#endif
diff --git a/src/animator/SkDisplayTypes.cpp b/src/animator/SkDisplayTypes.cpp
index 6132eb7a17..d3bfa101aa 100644
--- a/src/animator/SkDisplayTypes.cpp
+++ b/src/animator/SkDisplayTypes.cpp
@@ -81,11 +81,7 @@ SkDisplayFloat::SkDisplayFloat() : value(0) {
#ifdef SK_DUMP_ENABLED
void SkDisplayFloat::dump(SkAnimateMaker* maker) {
dumpBase(maker);
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("value=\"%g\" />\n", SkScalarToFloat(value));
-#else
- SkDebugf("value=\"%x\" />\n", value);
-#endif
}
#endif
diff --git a/src/animator/SkDisplayable.cpp b/src/animator/SkDisplayable.cpp
index ebcc8a3605..396ce6b769 100644
--- a/src/animator/SkDisplayable.cpp
+++ b/src/animator/SkDisplayable.cpp
@@ -205,11 +205,7 @@ void SkDisplayable::dumpAttrs(SkAnimateMaker* maker) {
SkDebugf("%d", op->fS32);
break;
case SkType_Float:
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("%g", SkScalarToFloat(op->fScalar));
-#else
- SkDebugf("%x", op->fScalar);
-#endif
break;
case SkType_String:
case SkType_DynamicString:
@@ -311,11 +307,7 @@ void SkDisplayable::dumpValues(const SkMemberInfo* info, SkDisplayTypes type, Sk
//should make this a separate case in dump attrs, rather than make dump values have a larger signature
case SkType_Point:
if (op.fScalar != blankOp.fScalar || op2.fScalar != blankOp.fScalar) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("%s=\"[%g,%g]\" ", info->fName, SkScalarToFloat(op.fScalar), SkScalarToFloat(op2.fScalar));
-#else
- SkDebugf("%s=\"[%x,%x]\" ", info->fName, op.fScalar, op2.fScalar);
-#endif
}
break;
case SkType_FromPathMode:
@@ -375,11 +367,7 @@ void SkDisplayable::dumpValues(const SkMemberInfo* info, SkDisplayTypes type, Sk
break;
case SkType_Float:
if (op.fScalar != blankOp.fScalar) { //or /65536?
-#ifdef SK_CAN_USE_FLOAT
SkDebugf("%s=\"%g\" ", info->fName, SkScalarToFloat(op.fScalar));
-#else
- SkDebugf("%s=\"%x\" ", info->fName, op.fScalar);
-#endif
}
break;
case SkType_String:
@@ -389,11 +377,7 @@ void SkDisplayable::dumpValues(const SkMemberInfo* info, SkDisplayTypes type, Sk
break;
case SkType_MSec:
if (op.fS32 != blankOp.fS32) {
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" %s=\"%g\" ", info->fName, SkScalarToFloat(SkScalarDiv(op.fS32, 1000)));
-#else
- SkDebugf(" %s=\"%x\" ", info->fName, SkScalarDiv(op.fS32, 1000));
-#endif
}
default:
SkDebugf("");
diff --git a/src/animator/SkScript.cpp b/src/animator/SkScript.cpp
index aa061698e8..3b498fa64b 100644
--- a/src/animator/SkScript.cpp
+++ b/src/animator/SkScript.cpp
@@ -1644,9 +1644,7 @@ bool SkScriptEngine::ValueToString(SkScriptValue value, SkString* string) {
#ifdef SK_SUPPORT_UNITTEST
-#ifdef SK_CAN_USE_FLOAT
- #include "SkFloatingPoint.h"
-#endif
+#include "SkFloatingPoint.h"
#define DEF_SCALAR_ANSWER 0
#define DEF_STRING_ANSWER NULL
@@ -1656,10 +1654,8 @@ bool SkScriptEngine::ValueToString(SkScriptValue value, SkString* string) {
#define testScalar(expression) { #expression, SkType_Float, 0, (float) expression, DEF_STRING_ANSWER }
#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkType_Float, 0, sk_float_mod(exp1, exp2), DEF_STRING_ANSWER }
#else
- #ifdef SK_CAN_USE_FLOAT
- #define testScalar(expression) { #expression, SkType_Float, 0, (int) ((expression) * 65536.0f), DEF_STRING_ANSWER }
- #define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkType_Float, 0, (int) (sk_float_mod(exp1, exp2) * 65536.0f), DEF_STRING_ANSWER }
- #endif
+ #define testScalar(expression) { #expression, SkType_Float, 0, (int) ((expression) * 65536.0f), DEF_STRING_ANSWER }
+ #define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkType_Float, 0, (int) (sk_float_mod(exp1, exp2) * 65536.0f), DEF_STRING_ANSWER }
#endif
#define testTrue(expression) { #expression, SkType_Int, 1, DEF_SCALAR_ANSWER, DEF_STRING_ANSWER }
#define testFalse(expression) { #expression, SkType_Int, 0, DEF_SCALAR_ANSWER, DEF_STRING_ANSWER }
@@ -1669,7 +1665,6 @@ static const SkScriptNAnswer scriptTests[] = {
testInt((6+7)*8),
testInt(0&&1?2:3),
testInt(3*(4+5)),
-#ifdef SK_CAN_USE_FLOAT
testScalar(1.0+2.0),
testScalar(1.0+5),
testScalar(3.0-1.0),
@@ -1689,7 +1684,6 @@ static const SkScriptNAnswer scriptTests[] = {
testFalse(-9!=-9.0),
testFalse(-9.!=-4.0-5),
testFalse(-9.*1!=-4-5),
-#endif
testInt(0x123),
testInt(0XABC),
testInt(0xdeadBEEF),
@@ -1740,7 +1734,6 @@ static const SkScriptNAnswer scriptTests[] = {
testInt(2!=2),
testInt(2!=11),
testInt(20!=11),
-#ifdef SK_CAN_USE_FLOAT
// left int, right scalar
testInt(2<2.),
testInt(2<11.),
@@ -1797,7 +1790,6 @@ static const SkScriptNAnswer scriptTests[] = {
testInt(2.!=2.),
testInt(2.!=11.),
testInt(20.!=11.),
-#endif
// int, string (string is int)
testFalse(2<'2'),
testTrue(2<'11'),
@@ -1821,7 +1813,6 @@ static const SkScriptNAnswer scriptTests[] = {
testFalse(20<'11.'),
testTrue(2=='2.'),
testFalse(2=='11.'),
-#ifdef SK_CAN_USE_FLOAT
// scalar, string
testFalse(2.<'2.'),
testTrue(2.<'11.'),
@@ -1840,7 +1831,6 @@ static const SkScriptNAnswer scriptTests[] = {
testFalse('20'<11.),
testTrue('2'==2.),
testFalse('2'==11.),
-#endif
// string, string
testFalse('2'<'2'),
testFalse('2'<'11'),
@@ -1873,9 +1863,7 @@ static const SkScriptNAnswer scriptTests[] = {
testInt(0?2:3?4:5),
testInt(1?0:3?4:5),
testInt(0?0:3?4:5)
-#ifdef SK_CAN_USE_FLOAT
, { "123.5", SkType_Float, 0, SkIntToScalar(123) + SK_Scalar1/2, DEF_STRING_ANSWER }
-#endif
};
#define SkScriptNAnswer_testCount SK_ARRAY_COUNT(scriptTests)
diff --git a/src/animator/SkScriptDecompile.cpp b/src/animator/SkScriptDecompile.cpp
index 933e0d7c2b..26b678c79d 100644
--- a/src/animator/SkScriptDecompile.cpp
+++ b/src/animator/SkScriptDecompile.cpp
@@ -155,11 +155,7 @@ void SkScriptEngine2::decompile(const unsigned char* start, size_t length) {
SkScalar scalar;
memcpy(&scalar, opCode, sizeof(scalar));
opCode += sizeof(SkScalar);
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" scalar: %g", SkScalarToFloat(scalar));
-#else
- SkDebugf(" scalar: %x", scalar);
-#endif
} break;
case SkScriptEngine2::kStringAccumulator:
case SkScriptEngine2::kStringOperand: {
diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp
index b2b6e4f0b1..54aa2bff8b 100644
--- a/src/animator/SkScriptTokenizer.cpp
+++ b/src/animator/SkScriptTokenizer.cpp
@@ -1279,23 +1279,18 @@ bool SkScriptEngine2::ValueToString(const SkScriptValue2& value, SkString* strin
#define testScalar(expression) { #expression, SkOperand2::kScalar, 0, (float) expression, NULL }
#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkOperand2::kScalar, 0, fmodf(exp1, exp2), NULL }
#else
-#ifdef SK_CAN_USE_FLOAT
#define testScalar(expression) { #expression, SkOperand2::kScalar, 0, (int) ((expression) * 65536.0f), NULL }
#define testRemainder(exp1, exp2) { #exp1 "%" #exp2, SkOperand2::kScalar, 0, (int) (fmod(exp1, exp2) * 65536.0f), NULL }
#endif
-#endif
#define testTrue(expression) { #expression, SkOperand2::kS32, 1, 0, NULL }
#define testFalse(expression) { #expression, SkOperand2::kS32, 0, 0, NULL }
static const SkScriptNAnswer2 scriptTests[] = {
testInt(1||(0&&3)),
-#ifdef SK_CAN_USE_FLOAT
testScalar(- -5.5- -1.5),
testScalar(1.0+5),
-#endif
testInt((6+7)*8),
testInt(3*(4+5)),
-#ifdef SK_CAN_USE_FLOAT
testScalar(1.0+2.0),
testScalar(3.0-1.0),
testScalar(6-1.0),
@@ -1313,7 +1308,6 @@ static const SkScriptNAnswer2 scriptTests[] = {
testFalse(-9!=-9.0),
testFalse(-9.!=-4.0-5),
testFalse(-9.*1!=-4-5),
-#endif
testInt(0x123),
testInt(0XABC),
testInt(0xdeadBEEF),
@@ -1364,7 +1358,6 @@ static const SkScriptNAnswer2 scriptTests[] = {
testInt(2!=2),
testInt(2!=11),
testInt(20!=11),
-#ifdef SK_CAN_USE_FLOAT
// left int, right scalar
testInt(2<2.),
testInt(2<11.),
@@ -1421,7 +1414,6 @@ static const SkScriptNAnswer2 scriptTests[] = {
testInt(2.!=2.),
testInt(2.!=11.),
testInt(20.!=11.),
-#endif
// int, string (string is int)
testFalse(2<'2'),
testTrue(2<'11'),
@@ -1445,7 +1437,6 @@ static const SkScriptNAnswer2 scriptTests[] = {
testFalse(20<'11.'),
testTrue(2=='2.'),
testFalse(2=='11.'),
-#ifdef SK_CAN_USE_FLOAT
// scalar, string
testFalse(2.<'2.'),
testTrue(2.<'11.'),
@@ -1464,7 +1455,6 @@ static const SkScriptNAnswer2 scriptTests[] = {
testFalse('20'<11.),
testTrue('2'==2.),
testFalse('2'==11.),
-#endif
// string, string
testFalse('2'<'2'),
testFalse('2'<'11'),
@@ -1481,9 +1471,7 @@ static const SkScriptNAnswer2 scriptTests[] = {
testInt(0||(0&&3)),
testInt(0||(1&&3)),
testInt(0&&1?2:3)
-#ifdef SK_CAN_USE_FLOAT
, { "123.5", SkOperand2::kScalar, 0, SkIntToScalar(123) + SK_Scalar1/2, NULL }
-#endif
};
#define SkScriptNAnswer_testCount SK_ARRAY_COUNT(scriptTests)
@@ -1507,10 +1495,8 @@ void SkScriptEngine2::UnitTest() {
break;
case SkOperand2::kScalar:
error = SkScalarAbs(value.fOperand.fScalar - scriptTests[index].fScalarAnswer);
-#ifdef SK_CAN_USE_FLOAT
if (error >= SK_Scalar1 / 10000)
SkDEBUGF(("script '%s' == value %g != expected answer %g\n", script, value.fOperand.fScalar / (1.0f * SK_Scalar1), scriptTests[index].fScalarAnswer / (1.0f * SK_Scalar1)));
-#endif
SkASSERT(error < SK_Scalar1 / 10000);
break;
case SkOperand2::kString:
diff --git a/src/core/SkCordic.cpp b/src/core/SkCordic.cpp
index 8fb60c547f..14d34fb9fd 100644
--- a/src/core/SkCordic.cpp
+++ b/src/core/SkCordic.cpp
@@ -197,13 +197,11 @@ SkFixed SkCordicExp(SkFixed a) {
#ifdef SK_DEBUG
-#ifdef SK_CAN_USE_FLOAT
- #include "SkFloatingPoint.h"
-#endif
+#include "SkFloatingPoint.h"
void SkCordic_UnitTest()
{
-#if defined(SK_SUPPORT_UNITTEST) && defined(SK_CAN_USE_FLOAT)
+#if defined(SK_SUPPORT_UNITTEST)
float val;
for (float angle = -720; angle < 720; angle += 30) {
float radian = angle * 3.1415925358f / 180.0f;
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index 29a50d1520..575b6021a1 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -43,11 +43,7 @@ struct SkEdge {
#ifdef SK_DEBUG
void dump() const {
- #ifdef SK_CAN_USE_FLOAT
SkDebugf("edge: firstY:%d lastY:%d x:%g dx:%g w:%d\n", fFirstY, fLastY, SkFixedToFloat(fX), SkFixedToFloat(fDX), fWinding);
- #else
- SkDebugf("edge: firstY:%d lastY:%d x:%x dx:%x w:%d\n", fFirstY, fLastY, fX, fDX, fWinding);
- #endif
}
void validate() const {
diff --git a/src/core/SkFloat.cpp b/src/core/SkFloat.cpp
index ffa5d9a0b8..ec785f320b 100644
--- a/src/core/SkFloat.cpp
+++ b/src/core/SkFloat.cpp
@@ -268,9 +268,7 @@ int SkFloat::Cmp(int32_t packed_a, int32_t packed_b)
#ifdef SK_DEBUG
#include "SkRandom.h"
-#ifdef SK_CAN_USE_FLOAT
- #include "SkFloatingPoint.h"
-#endif
+#include "SkFloatingPoint.h"
void SkFloat::UnitTest()
{
@@ -295,7 +293,6 @@ void SkFloat::UnitTest()
SkRandom rand;
-#ifdef SK_CAN_USE_FLOAT
int i;
for (i = 0; i < 1000; i++)
{
@@ -391,7 +388,6 @@ void SkFloat::UnitTest()
#endif
}
#endif
-#endif
}
#endif
diff --git a/src/core/SkFloatBits.cpp b/src/core/SkFloatBits.cpp
index fc46005f93..378f98db43 100644
--- a/src/core/SkFloatBits.cpp
+++ b/src/core/SkFloatBits.cpp
@@ -152,8 +152,6 @@ int32_t SkFloatBits_toIntCeil(int32_t packed) {
}
}
-#ifdef SK_CAN_USE_FLOAT
-
float SkIntToFloatCast(int32_t value) {
if (0 == value) {
return 0;
@@ -207,4 +205,3 @@ float SkIntToFloatCast_NoOverflowCheck(int32_t value) {
return data.fFloat;
}
-#endif
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp
index 7133658dad..85cb7c6bb9 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -1760,7 +1760,6 @@ void SkMatrix::dump() const {
}
void SkMatrix::toDumpString(SkString* str) const {
-#ifdef SK_CAN_USE_FLOAT
str->printf("[%8.4f %8.4f %8.4f][%8.4f %8.4f %8.4f][%8.4f %8.4f %8.4f]",
#ifdef SK_SCALAR_IS_FLOAT
fMat[0], fMat[1], fMat[2], fMat[3], fMat[4], fMat[5],
@@ -1770,9 +1769,4 @@ void SkMatrix::toDumpString(SkString* str) const {
SkFixedToFloat(fMat[3]), SkFixedToFloat(fMat[4]), SkFixedToFloat(fMat[5]),
SkFractToFloat(fMat[6]), SkFractToFloat(fMat[7]), SkFractToFloat(fMat[8]));
#endif
-#else // can't use float
- str->printf("[%x %x %x][%x %x %x][%x %x %x]",
- fMat[0], fMat[1], fMat[2], fMat[3], fMat[4], fMat[5],
- fMat[6], fMat[7], fMat[8]);
-#endif
}
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 034a515b50..7688f10f48 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1738,42 +1738,23 @@ void SkPath::dump(bool forceClose, const char title[]) const {
while ((verb = iter.next(pts, false)) != kDone_Verb) {
switch (verb) {
case kMove_Verb:
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" path: moveTo [%g %g]\n",
SkScalarToFloat(pts[0].fX), SkScalarToFloat(pts[0].fY));
-#else
- SkDebugf(" path: moveTo [%x %x]\n", pts[0].fX, pts[0].fY);
-#endif
break;
case kLine_Verb:
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" path: lineTo [%g %g]\n",
SkScalarToFloat(pts[1].fX), SkScalarToFloat(pts[1].fY));
-#else
- SkDebugf(" path: lineTo [%x %x]\n", pts[1].fX, pts[1].fY);
-#endif
break;
case kQuad_Verb:
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" path: quadTo [%g %g] [%g %g]\n",
SkScalarToFloat(pts[1].fX), SkScalarToFloat(pts[1].fY),
SkScalarToFloat(pts[2].fX), SkScalarToFloat(pts[2].fY));
-#else
- SkDebugf(" path: quadTo [%x %x] [%x %x]\n",
- pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY);
-#endif
break;
case kCubic_Verb:
-#ifdef SK_CAN_USE_FLOAT
SkDebugf(" path: cubeTo [%g %g] [%g %g] [%g %g]\n",
SkScalarToFloat(pts[1].fX), SkScalarToFloat(pts[1].fY),
SkScalarToFloat(pts[2].fX), SkScalarToFloat(pts[2].fY),
SkScalarToFloat(pts[3].fX), SkScalarToFloat(pts[3].fY));
-#else
- SkDebugf(" path: cubeTo [%x %x] [%x %x] [%x %x]\n",
- pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY,
- pts[3].fX, pts[3].fY);
-#endif
break;
case kClose_Verb:
SkDebugf(" path: close\n");
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index 85fecc9e04..d3775a524d 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -123,7 +123,6 @@ char* SkStrAppendS64(char string[], int64_t dec, int minDigits) {
return string;
}
-#ifdef SK_CAN_USE_FLOAT
char* SkStrAppendFloat(char string[], float value) {
// since floats have at most 8 significant digits, we limit our %g to that.
static const char gFormat[] = "%.8g";
@@ -134,7 +133,6 @@ char* SkStrAppendFloat(char string[], float value) {
SkASSERT(len <= SkStrAppendScalar_MaxSize);
return string + len;
}
-#endif
char* SkStrAppendFixed(char string[], SkFixed x) {
SkDEBUGCODE(char* start = string;)