Index: samplecode/SampleCamera.cpp |
diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp |
index 35fa719479424a7891312206279586e148a561b8..af9dbe8d653012070241b2d271e4dc3d29d6452f 100644 |
--- a/samplecode/SampleCamera.cpp |
+++ b/samplecode/SampleCamera.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SampleCode.h" |
+#include "SkAnimTimer.h" |
#include "SkView.h" |
#include "SkCanvas.h" |
#include "SkCamera.h" |
@@ -88,10 +89,11 @@ protected: |
} |
} |
- bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE { |
- fRY += (curr - prev) * 0.09f; |
- if (fRY >= 360) { |
+ bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { |
+ if (timer.isStopped()) { |
fRY = 0; |
+ } else { |
+ fRY = timer.scaled(90, 360); |
} |
return true; |
} |