Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Unified Diff: samplecode/SampleCode.h

Issue 953383002: fuzzer fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix up width and height in initializer Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698