OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "VulkanViewer.h" | 8 #include "VulkanViewer.h" |
9 | 9 |
10 #include "GMSlide.h" | 10 #include "GMSlide.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 canvas->restore(); | 331 canvas->restore(); |
332 } | 332 } |
333 | 333 |
334 void VulkanViewer::onIdle(double ms) { | 334 void VulkanViewer::onIdle(double ms) { |
335 // Record measurements | 335 // Record measurements |
336 fMeasurements[fCurrentMeasurement++] = ms; | 336 fMeasurements[fCurrentMeasurement++] = ms; |
337 fCurrentMeasurement &= (kMeasurementCount - 1); // fast mod | 337 fCurrentMeasurement &= (kMeasurementCount - 1); // fast mod |
338 SkASSERT(fCurrentMeasurement < kMeasurementCount); | 338 SkASSERT(fCurrentMeasurement < kMeasurementCount); |
339 | 339 |
340 fAnimTimer.updateTime(); | 340 fAnimTimer.updateTime(); |
341 if (fDisplayStats || fSlides[fCurrentSlide]->animate(fAnimTimer)) { | 341 if (fSlides[fCurrentSlide]->animate(fAnimTimer) || fDisplayStats) { |
342 fWindow->inval(); | 342 fWindow->inval(); |
343 } | 343 } |
344 } | 344 } |
OLD | NEW |