diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-18 20:10:31 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-18 20:10:31 +0000 |
commit | bad8c87812234117d3dc411382fca60e2e868477 (patch) | |
tree | 0d826dadf1bf59d2c1d370784981136c4e41cdc7 /samplecode | |
parent | 00e17c5a1b37de8e9f9e9a413527080e94f82cb3 (diff) |
show consistent timings between debug and release
git-svn-id: http://skia.googlecode.com/svn/trunk@1370 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 7241185247..76f4da1e26 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -25,10 +25,11 @@ extern SkView* create_overview(int, const SkViewFactory[]); #define ANIMATING_DELAY 750 #ifdef SK_DEBUG - #define FPS_REPEAT_COUNT 10 + #define FPS_REPEAT_MULTIPLIER 1 #else - #define FPS_REPEAT_COUNT 100 + #define FPS_REPEAT_MULTIPLIER 10 #endif +#define FPS_REPEAT_COUNT (10 * FPS_REPEAT_MULTIPLIER) #ifdef SK_SUPPORT_GL #include "GrGLConfig.h" @@ -1310,7 +1311,7 @@ void SampleWindow::updateTitle() { } if (fMeasureFPS) { - title.appendf(" %4d ms", fMeasureFPS_Time); + title.appendf(" %6.1f ms", fMeasureFPS_Time / (float)FPS_REPEAT_MULTIPLIER); } if (fUsePipe && SampleView::IsSampleView(view)) { title.prepend("<P> "); |