From 35ee0e09b4966bd087147e2c9b4c3177e9737d3b Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Sun, 6 Aug 2017 22:29:57 -0400 Subject: clean up useage of SkFloatBits Bug: skia: Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613 Reviewed-on: https://skia-review.googlesource.com/31222 Commit-Queue: Mike Reed Reviewed-by: Florin Malita --- bench/MathBench.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'bench/MathBench.cpp') 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; ) -- cgit v1.2.3