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

Unified Diff: gm/addarc.cpp

Issue 894083003: add SkAnimTimer, SPACE = pause/resume, ESP = stop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« gm/SkAnimTimer.h ('K') | « gm/SkAnimTimer.h ('k') | gm/gm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/addarc.cpp
diff --git a/gm/addarc.cpp b/gm/addarc.cpp
index 1386cdd0e78e6a2c985f0b20cdc8c6f2d247b61a..e6fad25772db27b6a8ca642b3885ca2c14a12981 100644
--- a/gm/addarc.cpp
+++ b/gm/addarc.cpp
@@ -6,6 +6,7 @@
*/
#include "gm.h"
+#include "SkAnimTimer.h"
#include "SkCanvas.h"
#include "SkRandom.h"
@@ -49,8 +50,8 @@ protected:
}
}
- bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE {
- fRotate = SkDoubleToScalar(fmod(curr * 0.001, 360));
+ bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
+ fRotate = timer.scaled(1, 360);
return true;
}
« gm/SkAnimTimer.h ('K') | « gm/SkAnimTimer.h ('k') | gm/gm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698