aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/AAClipBench.cpp4
-rw-r--r--bench/InterpBench.cpp8
-rw-r--r--bench/MathBench.cpp6
3 files changed, 10 insertions, 8 deletions
diff --git a/bench/AAClipBench.cpp b/bench/AAClipBench.cpp
index 4467a95df5..ce91b2cf91 100644
--- a/bench/AAClipBench.cpp
+++ b/bench/AAClipBench.cpp
@@ -37,8 +37,8 @@ public:
doPath ? "path" : "rect",
doAA ? "AA" : "BW");
- fClipRect.set(SkFloatToScalar(10.5), SkFloatToScalar(10.5),
- SkFloatToScalar(50.5), SkFloatToScalar(50.5));
+ fClipRect.set(SkFloatToScalar(10.5f), SkFloatToScalar(10.5f),
+ SkFloatToScalar(50.5f), SkFloatToScalar(50.5f));
fClipPath.addRoundRect(fClipRect, SkIntToScalar(10), SkIntToScalar(10));
fDrawRect.set(SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(100), SkIntToScalar(100));
diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp
index 89841f8a69..85fada3f0e 100644
--- a/bench/InterpBench.cpp
+++ b/bench/InterpBench.cpp
@@ -102,10 +102,10 @@ protected:
int64_t step = (int64_t)(dx * 65536 * 655536 * 65536);
SkFixed tmp;
for (int i = 0; i < count; i += 4) {
- tmp = curr >> 32; dst[i + 0] = TILE(tmp, count); curr += step;
- tmp = curr >> 32; dst[i + 1] = TILE(tmp, count); curr += step;
- tmp = curr >> 32; dst[i + 2] = TILE(tmp, count); curr += step;
- tmp = curr >> 32; dst[i + 3] = TILE(tmp, count); curr += step;
+ tmp = (SkFixed) (curr >> 32); dst[i + 0] = TILE(tmp, count); curr += step;
+ tmp = (SkFixed) (curr >> 32); dst[i + 1] = TILE(tmp, count); curr += step;
+ tmp = (SkFixed) (curr >> 32); dst[i + 2] = TILE(tmp, count); curr += step;
+ tmp = (SkFixed) (curr >> 32); dst[i + 3] = TILE(tmp, count); curr += step;
}
}
private:
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index 0e35940bfa..21c113c0ca 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -138,7 +138,7 @@ static inline uint32_t QMul64(uint32_t value, U8CPU alpha) {
uint64_t tmp = value;
tmp = (tmp & mask) | ((tmp & ~mask) << 24);
tmp *= alpha;
- return ((tmp >> 8) & mask) | ((tmp >> 32) & ~mask);
+ return (uint32_t) (((tmp >> 8) & mask) | ((tmp >> 32) & ~mask));
}
class QMul64Bench : public MathBenchU32 {
@@ -284,6 +284,9 @@ protected:
for (int j = 0; j < NN; ++j) {
for (int i = 0; i < N - 4; ++i) {
const SkRect* r = reinterpret_cast<const SkRect*>(&data[i]);
+ if (false) { // avoid bit rot, suppress warning
+ isFinite(*r);
+ }
counter += r->isFinite();
}
}
@@ -336,7 +339,6 @@ protected:
SkRandom rand;
float accum = 0;
const float* data = fData;
- float tmp[ARRAY] = {};
if (fFast) {
for (int j = 0; j < LOOP; ++j) {