aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gm.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-15 10:09:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-15 14:29:43 +0000
commit81f60ecd9cc0e7c507f9e1f05862bee6a19ee0c6 (patch)
tree6022389b6b7aa8789d8f86759ed208c24a3d3c03 /gm/gm.h
parent6bbd386a0e4bf13cd7abb887900018a56e24091b (diff)
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>
Diffstat (limited to 'gm/gm.h')
-rw-r--r--gm/gm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gm/gm.h b/gm/gm.h
index 0447f09528..a8190bfff4 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 @@ namespace skiagm {
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 @@ namespace skiagm {
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;