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/benchmain.cpp b/bench/benchmain.cpp
index 9edb8cf..692b0bd 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -738,7 +738,13 @@
AutoPrePostDraw appd(bench);
+ bool runOnce = false;
for (int x = 0; x < configs.count(); ++x) {
+ if (!bench->isRendering() && runOnce) {
+ continue;
+ }
+ runOnce = true;
+
int configIndex = configs[x];
outConfig = gConfigs[configIndex].fConfig;