Samples: add name() virtual
Change-Id: I9b6e39bc7e35346bb73dfe014de1c8daa5a92f2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225428
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/samplecode/Sample.h b/samplecode/Sample.h
index 1f1bb4b..ed6fe1c 100644
--- a/samplecode/Sample.h
+++ b/samplecode/Sample.h
@@ -83,6 +83,8 @@
void setBGColor(SkColor color) { fBGColor = color; }
bool animate(const AnimTimer& timer) { return this->onAnimate(timer); }
+ virtual SkString name() = 0;
+
class Event {
public:
Event();
@@ -189,7 +191,6 @@
static bool CharQ(const Event&, SkUnichar* outUni);
static bool TitleQ(const Event&);
static void TitleR(Event*, const char title[]);
- static bool RequestTitle(Sample* view, SkString* title);
protected:
/** Override to handle events in your subclass.