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

Unified Diff: gm/gm.h

Issue 680533002: add gm: colorwheel (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
Index: gm/gm.h
diff --git a/gm/gm.h b/gm/gm.h
index e48f772f397a093521027abc56720f2955bdcbd3..9df26ebd4c7aad138225333938f978fd522c8626 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -24,6 +24,15 @@
static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \
static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_));
+#define DEF_SIMPLE_GM(F, W, H) \
mtklein 2014/10/24 16:47:48 Let's do this like DEF_TEST? #define DEF_SIMPLE_G
hal.canary 2014/10/24 17:22:01 Done.
+ class SK_MACRO_CONCAT(F, _GM) : public skiagm::GM { \
+ protected: \
+ virtual void onDraw(SkCanvas* canvas) { (F)(canvas); } \
+ virtual SkISize onISize() { return SkISize::Make((W), (H)); } \
+ virtual SkString onShortName() { return SkString(#F); } \
+ }; \
+ DEF_GM( return SkNEW(SK_MACRO_CONCAT(F, _GM)); )
+
namespace skiagm {
class GM {

Powered by Google App Engine
This is Rietveld 408576698