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

Unified Diff: tests/Test.h

Issue 319473003: 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 | « no previous file | tests/Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.h
diff --git a/tests/Test.h b/tests/Test.h
index 4d2cf2b6392349ed0751eb52274d3d219d27b7d9..e1d96b93b685489732e62490aac5fd4d76b497ca 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -62,8 +62,10 @@ namespace skiatest {
static SkString GetTmpDir();
- static void SetResourcePath(const char*);
- static SkString GetResourcePath();
+ static void SetResourcePath(const char* resourcePath) {
mtklein 2014/06/05 12:55:33 I wouldn't bother with the churn? There's not goi
tfarina 2014/06/06 01:53:10 Done.
+ gResourcePath = resourcePath;
+ }
+ static SkString& GetResourcePath() { return gResourcePath; }
mtklein 2014/06/05 12:55:33 SkString is fine to return by value, especially he
tfarina 2014/06/06 01:53:10 Done.
virtual bool isGPUTest() const { return false; }
virtual void setGrContextFactory(GrContextFactory* factory) {}
@@ -73,6 +75,8 @@ namespace skiatest {
virtual void onRun(Reporter*) = 0;
private:
+ static SkString gResourcePath;
mtklein 2014/06/05 12:55:33 Let's turn this back into a static const char*. I
tfarina 2014/06/06 01:53:10 Done.
+
Reporter* fReporter;
SkString fName;
bool fPassed;
« no previous file with comments | « no previous file | tests/Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698