aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/effects/SkArithmeticMode.cpp4
-rw-r--r--src/effects/SkGradientShader.cpp6
-rw-r--r--src/effects/SkTableMaskFilter.cpp2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 45464c2efa..c999ce08c9 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -133,6 +133,7 @@ static bool fitsInBits(SkScalar x, int bits) {
#endif
}
+#if 0 // UNUSED
static int32_t toDot8(SkScalar x) {
#ifdef SK_SCALAR_IS_FIXED
x += 1 << 7;
@@ -142,17 +143,18 @@ static int32_t toDot8(SkScalar x) {
return (int32_t)(x * 256);
#endif
}
+#endif
SkXfermode* SkArithmeticMode::Create(SkScalar k1, SkScalar k2,
SkScalar k3, SkScalar k4) {
if (fitsInBits(k1, 8) && fitsInBits(k2, 16) &&
fitsInBits(k2, 16) && fitsInBits(k2, 24)) {
+#if 0 // UNUSED
int32_t i1 = toDot8(k1);
int32_t i2 = toDot8(k2);
int32_t i3 = toDot8(k3);
int32_t i4 = toDot8(k4);
-#if 0
if (i1) {
return SkNEW_ARGS(SkArithmeticMode_quad, (i1, i2, i3, i4));
}
diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp
index 1ef6446afc..8203d60ebd 100644
--- a/src/effects/SkGradientShader.cpp
+++ b/src/effects/SkGradientShader.cpp
@@ -2093,6 +2093,7 @@ private:
const SkPoint fCenter;
};
+#ifndef SK_SCALAR_IS_FLOAT
#ifdef COMPUTE_SWEEP_TABLE
#define PI 3.14159265
static bool gSweepTableReady;
@@ -2129,12 +2130,14 @@ static const uint8_t gSweepTable[] = {
};
static const uint8_t* build_sweep_table() { return gSweepTable; }
#endif
+#endif
// divide numer/denom, with a bias of 6bits. Assumes numer <= denom
// and denom != 0. Since our table is 6bits big (+1), this is a nice fit.
// Same as (but faster than) SkFixedDiv(numer, denom) >> 10
//unsigned div_64(int numer, int denom);
+#ifndef SK_SCALAR_IS_FLOAT
static unsigned div_64(int numer, int denom) {
SkASSERT(numer <= denom);
SkASSERT(numer > 0);
@@ -2201,8 +2204,10 @@ static unsigned div_64(int numer, int denom) {
}
return result;
}
+#endif
// Given x,y in the first quadrant, return 0..63 for the angle [0..90]
+#ifndef SK_SCALAR_IS_FLOAT
static unsigned atan_0_90(SkFixed y, SkFixed x) {
#ifdef SK_DEBUG
{
@@ -2256,6 +2261,7 @@ static unsigned atan_0_90(SkFixed y, SkFixed x) {
SkASSERT(result <= 63);
return result;
}
+#endif
// returns angle in a circle [0..2PI) -> [0..255]
#ifdef SK_SCALAR_IS_FLOAT
diff --git a/src/effects/SkTableMaskFilter.cpp b/src/effects/SkTableMaskFilter.cpp
index fed0c5da72..43da55eab1 100644
--- a/src/effects/SkTableMaskFilter.cpp
+++ b/src/effects/SkTableMaskFilter.cpp
@@ -89,7 +89,7 @@ void SkTableMaskFilter::MakeGammaTable(uint8_t table[256], SkScalar gamma) {
float x = 0;
for (int i = 0; i < 256; i++) {
- float ee = powf(x, g) * 255;
+ // float ee = powf(x, g) * 255;
table[i] = SkPin32(sk_float_round2int(powf(x, g) * 255), 0, 255);
x += dx;
}