aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-10 17:22:43 +0000
committerGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-10 17:22:43 +0000
commit8ad29cea429e5b6f5b37f647a0eacadd7c9cf86a (patch)
treef47c7ec1001ebb4fa6e621d75d0108e3a8bd5f83
parent508780ed088d1b72222111542fd5cae74f810f5f (diff)
Fix bench logging for --repeat 1
Addressing https://code.google.com/p/skia/issues/detail?id=1607 R=scroggo@google.com Review URL: https://codereview.chromium.org/23923011 git-svn-id: http://skia.googlecode.com/svn/trunk@11181 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--bench/benchmain.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 3b4b698296..472d4b95dc 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -923,23 +923,22 @@ int tool_main(int argc, char** argv) {
SkAssertResult(timerData.appendTimes(timer));
}
- if (repeatDraw > 1) {
- const char* timeFormat;
- if (TimerData::kPerIter_Result == timerResult) {
- timeFormat = perIterTimeformat.c_str();
- } else {
- timeFormat = normalTimeFormat.c_str();
- }
- uint32_t filteredTimerTypes = timerTypes;
- if (NULL == context) {
- filteredTimerTypes &= ~TimerData::kGpu_Flag;
- }
- SkString result = timerData.getResult(timeFormat,
- timerResult,
- configName,
- filteredTimerTypes);
- logger.logProgress(result);
+ const char* timeFormat;
+ if (repeatDraw > 1 && TimerData::kPerIter_Result == timerResult) {
+ timeFormat = perIterTimeformat.c_str();
+ } else {
+ timeFormat = normalTimeFormat.c_str();
}
+ uint32_t filteredTimerTypes = timerTypes;
+ if (NULL == context) {
+ filteredTimerTypes &= ~TimerData::kGpu_Flag;
+ }
+ SkString result = timerData.getResult(timeFormat,
+ timerResult,
+ configName,
+ filteredTimerTypes);
+ logger.logProgress(result);
+
if (outDir.size() > 0 && kNonRendering_Backend != backend) {
saveFile(bench->getName(), configName, outDir.c_str(),
device->accessBitmap(false));