Index: samplecode/SampleCamera.cpp |
diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp |
index 7660129c386705d753de464973c665b82626b16b..35fa719479424a7891312206279586e148a561b8 100644 |
--- a/samplecode/SampleCamera.cpp |
+++ b/samplecode/SampleCamera.cpp |
@@ -86,12 +86,14 @@ protected: |
SkRect r = { -150, -150, 150, 150 }; |
canvas->drawRoundRect(r, 30, 30, paint); |
} |
+ } |
- fRY += SampleCode::GetAnimSecondsDelta() * 90; |
- if (fRY >= SkIntToScalar(360)) { |
+ bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE { |
+ fRY += (curr - prev) * 0.09f; |
+ if (fRY >= 360) { |
fRY = 0; |
} |
- this->inval(NULL); |
+ return true; |
} |
private: |