Let SkBenchmark classes specify that they do no rendering.
Doing this gives us a 15-20% speedup in bench cycle time.
Here again I'm just picking the easy targets.
http://codereview.appspot.com/6500115/
git-svn-id: http://skia.googlecode.com/svn/trunk@5525 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index 414036b..df3d3a5 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -30,6 +30,8 @@
for (int i = 0; i < kBuffer; ++i) {
fSrc[i] = rand.nextSScalar1();
}
+
+ fIsRendering = false;
}
virtual void performTest(float* SK_RESTRICT dst,
@@ -265,6 +267,7 @@
fProc = gRec[index].fProc;
fName = gRec[index].fName;
}
+ fIsRendering = false;
}
protected:
@@ -330,6 +333,7 @@
} else {
fName = "floor_std";
}
+ fIsRendering = false;
}
virtual void process(float) {}