diff options
author | halcanary <halcanary@google.com> | 2014-10-26 05:23:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-26 05:23:53 -0700 |
commit | 30b83d45a3af444e6868c638d86442c2ea3e20c6 (patch) | |
tree | 1500063e2224a5820798eec578bf941c50e977e6 /gm/gm.h | |
parent | 86217d831d70949f9dde6a60f821d3f357558bdf (diff) |
add gm: colorwheel
BUG=skia:3061
Review URL: https://codereview.chromium.org/680533002
Diffstat (limited to 'gm/gm.h')
-rw-r--r-- | gm/gm.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -24,6 +24,20 @@ static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \ static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_)); +// See colorwheel.cpp for example usage. +#define DEF_SIMPLE_GM(NAME, CANVAS, W, H) \ + class SK_MACRO_CONCAT(NAME, _GM) : public skiagm::GM { \ + virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; \ + virtual SkISize onISize() SK_OVERRIDE { \ + return SkISize::Make((W), (H)); \ + } \ + virtual SkString onShortName() SK_OVERRIDE { \ + return SkString(#NAME); \ + } \ + }; \ + DEF_GM( return SkNEW(SK_MACRO_CONCAT(NAME, _GM)); ) \ + void SK_MACRO_CONCAT(NAME, _GM)::onDraw(SkCanvas* CANVAS) + namespace skiagm { class GM { |