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

Side by Side Diff: tools/vulkan/viewer/VulkanViewer.cpp

Issue 1918083003: Fix animation with stats in VulkanViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698