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

Unified Diff: gm/gmmain.cpp

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: initialize fGr to NULL 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/gm.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 018dfe6cedb4678bb6b9c0c534bdc6533fa879ed..0d8d734565c5814ac06572bddc8c885f843f39ae 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1478,8 +1478,7 @@ static void SetGr(GrContext* grContext) {
/**
* Gets the global GrContext, can be called by GM tests.
*/
-GrContext* GetGr();
-GrContext* GetGr() {
+static GrContext* GetGr() {
return gGrContext.get();
}
@@ -1500,9 +1499,6 @@ public:
private:
GrContext* fOld;
};
-#else
-GrContext* GetGr();
-GrContext* GetGr() { return NULL; }
#endif
}
@@ -1590,6 +1586,7 @@ ErrorCombination run_multiple_configs(GMMain &gmmain, GM *gm,
gpuTarget = auGpuTarget;
grSuccess = true;
autogr.set(gr);
robertphillips 2013/09/16 18:13:38 Why not just "gr"?
mtklein 2013/09/16 18:17:43 No good reason. Got rid of GetGr() entirely.
+ gm->setGr(GetGr());
// Set the user specified cache limits if non-default.
size_t bytes;
int count;
« no previous file with comments | « gm/gm.cpp ('k') | gm/image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698