add SampleCode::GetAnimTime() so slides go through a central location for
animation timing. This allows us to "freeze" time in order to do things like
draw multiple times to test clipping.
git-svn-id: http://skia.googlecode.com/svn/trunk@444 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index 4ca5b2a..e1b05ad 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -148,9 +148,10 @@
// test that we can re-record a subpicture, and see the results
+ SkRandom rand(SampleCode::GetAnimTime());
canvas->translate(SkIntToScalar(10), SkIntToScalar(250));
drawCircle(fSubPicture->beginRecording(50, 50), 25,
- fRand.nextU() | 0xFF000000);
+ rand.nextU() | 0xFF000000);
canvas->drawPicture(*fPicture);
delayInval(500);
}
@@ -172,7 +173,6 @@
SkPicture* fPicture;
SkPicture* fSubPicture;
- SkRandom fRand;
typedef SkView INHERITED;
};