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

Unified Diff: gm/gm.h

Issue 320733002: Revert of Clean up Test's resourcePath code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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/factory.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 a48976b20efdbe86f3b3d347b5387ff460718d87..90de96f7e80826e13f94e20dce6174f3f88ab48e 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -96,8 +96,13 @@
// GM's getISize bounds.
void drawSizeBounds(SkCanvas*, SkColor);
- static void SetResourcePath(const char*);
- static SkString GetResourcePath();
+ static void SetResourcePath(const char* resourcePath) {
+ gResourcePath = resourcePath;
+ }
+
+ static SkString& GetResourcePath() {
+ return gResourcePath;
+ }
bool isCanvasDeferred() const { return fCanvasIsDeferred; }
void setCanvasIsDeferred(bool isDeferred) {
@@ -110,7 +115,7 @@
}
protected:
- static const char* gResourcePath;
+ static SkString gResourcePath;
virtual void onOnceBeforeDraw() {}
virtual void onDraw(SkCanvas*) = 0;
« no previous file with comments | « gm/factory.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698