aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleCamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleCamera.cpp')
-rw-r--r--samplecode/SampleCamera.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp
index 7660129c38..35fa719479 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: