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

Unified Diff: gm/gm.h

Issue 23567032: Have GMs read the GrContext via a setter/getter rather than a global. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use Brian's suggestion Created 7 years, 3 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
« no previous file with comments | « gm/bleed.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm.h
diff --git a/gm/gm.h b/gm/gm.h
index 6cd97b5a2bd75fcd47c0d84bbb6f3c6b86b8f359..2886f8c243fcdb5c24c3c8bf790557848e31ec67 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -16,6 +16,10 @@
#include "SkString.h"
#include "SkTRegistry.h"
+#if SK_SUPPORT_GPU
+#include "GrContext.h"
+#endif
+
#define DEF_GM(code) \
static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \
static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_));
@@ -93,6 +97,10 @@ namespace skiagm {
fCanvasIsDeferred = isDeferred;
}
+#if SK_SUPPORT_GPU
+ static GrContext* GetGr(/*very nearly const*/ SkCanvas*);
+#endif
+
protected:
static SkString gResourcePath;
« no previous file with comments | « gm/bleed.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698