Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: tools/viewer/Viewer.cpp

Issue 1999213002: Add Xlib support to viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix line lengths Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/viewer/Viewer.cpp
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 7f18652c2c024ba98599f24969ba85e4f506a883..440be9e2874ebb508e17c3c020e78812222c7574 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -357,10 +357,12 @@ void Viewer::drawStats(SkCanvas* canvas) {
}
void Viewer::onIdle(double ms) {
- // Record measurements
- fMeasurements[fCurrentMeasurement++] = ms;
- fCurrentMeasurement &= (kMeasurementCount - 1); // fast mod
- SkASSERT(fCurrentMeasurement < kMeasurementCount);
+ if (ms > 1.0) {
+ // Record measurements
+ fMeasurements[fCurrentMeasurement++] = ms;
+ fCurrentMeasurement &= (kMeasurementCount - 1); // fast mod
+ SkASSERT(fCurrentMeasurement < kMeasurementCount);
+ }
fAnimTimer.updateTime();
if (fSlides[fCurrentSlide]->animate(fAnimTimer) || fDisplayStats) {

Powered by Google App Engine
This is Rietveld 408576698