aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-19 21:45:10 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-19 21:45:10 +0000
commitfaeb18bb214c3a22c22faed33d98e29c29a365f9 (patch)
tree584e7a05a3178eec86893d3a5ae07fef393f9449 /tools
parent8ac834b0301d606302be9a6c86ba16e37a1b0345 (diff)
Revert "Slipping in a small bug fix for my previous patch"
This reverts commit 1908ef0441e37c98b00ffe6c0a89d247393aeead. git-svn-id: http://skia.googlecode.com/svn/trunk@10215 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/bbh_shootout.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/bbh_shootout.cpp b/tools/bbh_shootout.cpp
index ca29586a04..d86e5ffe39 100644
--- a/tools/bbh_shootout.cpp
+++ b/tools/bbh_shootout.cpp
@@ -265,7 +265,7 @@ static bool benchmark_loop(
int argc,
char **argv,
const BenchmarkControl& benchControl,
- Histogram* histogram) {
+ Histogram** histogram) {
static const SkString timeFormat("%f");
TimerData timerData(timeFormat, timeFormat);
@@ -280,8 +280,8 @@ static bool benchmark_loop(
benchControl.fFunction(benchControl.fType, benchControl.fTileSize, path, pic, &timer);
timerData.appendTimes(&timer, argc - 1 == index);
- histogram[index - 1].fPath = path;
- histogram[index - 1].fCpuTime = SkDoubleToScalar(timer.fCpu);
+ histogram[index - 1]->fPath = path;
+ histogram[index - 1]->fCpuTime = SkDoubleToScalar(timer.fCpu);
}
const SkString timerResult = timerData.getResult(
@@ -321,13 +321,14 @@ int tool_main(int argc, char** argv) {
return -1;
}
- Histogram histograms[argc - 1][kNumBenchmarks];
+ Histogram* histograms[kNumBenchmarks];
for (size_t i = 0; i < kNumBenchmarks; ++i) {
+ histograms[i] = SkNEW_ARRAY(Histogram, argc - 1);
bool success = benchmark_loop(
argc, argv,
BenchmarkControl::Make(i),
- histograms[i]);
+ &histograms[i]);
if (!success) {
SkDebugf("benchmark_loop failed at index %d", i);
}