aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/MathBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/MathBench.cpp')
-rw-r--r--bench/MathBench.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index 541a1052dc..7768253544 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -598,29 +598,3 @@ DEF_BENCH( return new CLZBench(true); )
DEF_BENCH( return new NormalizeBench(); )
DEF_BENCH( return new FixedMathBench(); )
-
-
-struct FloatToIntBench : public Benchmark {
- enum { N = 1000000 };
- float fFloats[N];
- int fInts [N];
-
- const char* onGetName() override { return "float_to_int"; }
- bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; }
-
- void onDelayedSetup() override {
- const auto f32 = 4294967296.0f;
- for (int i = 0; i < N; ++i) {
- fFloats[i] = -f32 + i*(2*f32/N);
- }
- }
-
- void onDraw(int loops, SkCanvas*) override {
- while (loops --> 0) {
- for (int i = 0; i < N; i++) {
- fInts[i] = SkFloatToIntFloor(fFloats[i]);
- }
- }
- }
-};
-DEF_BENCH( return new FloatToIntBench; )