Allow slides/gms to extend the UI
Bug: skia:
Change-Id: Ia5971d827e6e05ab6cc30af3105b3b32ee691a34
Reviewed-on: https://skia-review.googlesource.com/128321
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/gm/gm.h b/gm/gm.h
index 0447f09..a8190bf 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -10,6 +10,7 @@
#include "SkBitmap.h"
#include "SkCanvas.h"
+#include "SkMetaData.h"
#include "SkPaint.h"
#include "SkSize.h"
#include "SkString.h"
@@ -89,6 +90,9 @@
return this->onHandleKey(uni);
}
+ bool getControls(SkMetaData* controls) { return this->onGetControls(controls); }
+ void setControls(const SkMetaData& controls) { this->onSetControls(controls); }
+
virtual void modifyGrContextOptions(GrContextOptions* options) {}
/** draws a standard message that the GM is only intended to be used with the GPU.*/
@@ -103,6 +107,8 @@
virtual bool onAnimate(const SkAnimTimer&) { return false; }
virtual bool onHandleKey(SkUnichar uni) { return false; }
+ virtual bool onGetControls(SkMetaData*) { return false; }
+ virtual void onSetControls(const SkMetaData&) {}
private:
Mode fMode;