Index: samplecode/SampleCode.h |
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h |
index e65919a765dc2fa3ab44ed37796aef040b3145c5..4152f54c675f1c620dff51647f84fdf4ffa60867 100644 |
--- a/samplecode/SampleCode.h |
+++ b/samplecode/SampleCode.h |
@@ -107,6 +107,7 @@ public: |
: fPipeState(SkOSMenu::kOffState) |
, fBGColor(SK_ColorWHITE) |
, fRepeatCount(1) |
+ , fHaveCalledOnceBeforeDraw(false) |
{} |
void setBGColor(SkColor color) { fBGColor = color; } |
@@ -131,6 +132,7 @@ protected: |
virtual void onDrawBackground(SkCanvas*); |
virtual void onDrawContent(SkCanvas*) = 0; |
virtual bool onAnimate(const SkAnimTimer&) { return false; } |
+ virtual void onOnceBeforeDraw() {} |
// overrides |
virtual bool onEvent(const SkEvent& evt); |
@@ -143,7 +145,7 @@ protected: |
private: |
int fRepeatCount; |
- |
+ bool fHaveCalledOnceBeforeDraw; |
typedef SkView INHERITED; |
}; |