aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 18:48:27 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 18:48:27 +0000
commitdcfed6cecfde7a6e4983c1caf7ffb417c891667f (patch)
treefede17c758e59c772107d1035cef605a3fec3613 /bench
parent4e1d4b3d23fb9ffb655b6cf2a17b35533b57869f (diff)
fix warnings when running a no gpu build
R=mtklein@google.com Review URL: https://codereview.chromium.org/26908002 git-svn-id: http://skia.googlecode.com/svn/trunk@11710 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r--bench/benchmain.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index c443c34fa5..b970d09bc8 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -646,9 +646,8 @@ int tool_main(int argc, char** argv) {
#endif
timer.end();
-#if SK_SUPPORT_GPU
- // currently we only setup the frame interval for the GPU
- if (!frameIntervalComputed && NULL != glContext) {
+ // setup the frame interval for subsequent iterations
+ if (!frameIntervalComputed) {
frameIntervalTime += timer.fWall;
frameIntervalTotalLoops += loopsPerIter;
if (frameIntervalTime >= FLAGS_minMs) {
@@ -663,7 +662,7 @@ int tool_main(int argc, char** argv) {
// timer.fWall, loopsPerFrame);
}
}
-#endif
+
const double current = timer.fWall / loopsPerIter;
if (FLAGS_verbose && current > previous) { SkDebugf("↑"); }
if (FLAGS_verbose) { SkDebugf("%.3g ", current); }