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

Unified Diff: samplecode/SampleHT.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
Index: samplecode/SampleHT.cpp
diff --git a/samplecode/SampleHT.cpp b/samplecode/SampleHT.cpp
index 07605fe1ed65dd0cb8c1f18a3abf4dba9895fefc..1436817e769e91a28f0b6a3d6d2753b1c58ebde3 100644
--- a/samplecode/SampleHT.cpp
+++ b/samplecode/SampleHT.cpp
@@ -6,6 +6,7 @@
*/
#include "SampleCode.h"
+#include "SkAnimTimer.h"
#include "SkView.h"
#include "SkCanvas.h"
#include "SkCanvasDrawable.h"
@@ -155,8 +156,8 @@ protected:
canvas->EXPERIMENTAL_drawDrawable(fRoot);
}
- bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE {
- fTime = curr;
+ bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE {
+ fTime = timer.msec();
for (int i = 0; i < N; ++i) {
fArray[i].fDrawable->setTime(fTime);
}

Powered by Google App Engine
This is Rietveld 408576698