aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/SkBenchmark.h
diff options
context:
space:
mode:
authorGravatar tfarina <tfarina@chromium.org>2014-06-07 20:50:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-07 20:50:44 -0700
commit52e4f413ffe2d281f9e90ff2147db08083ffcba7 (patch)
treee634f5fa3e03aa48bdb9cdd7a3399b7aca967765 /bench/SkBenchmark.h
parent3d06b48660e389a4e4c060ac8b6b0ba49363c853 (diff)
Clean up resourcePath code.
1) Make the implementation of SetResourcePath/GetResourcePath of GM and SkBenchmark match with the one in Test. 2) Make gResourcePath a static pointer to const char and move it inside the classes. BUG=None TEST=make tests && out/Debug/tests make gm && out/Debug/gm make bench && out/Debug/bench R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/319473003
Diffstat (limited to 'bench/SkBenchmark.h')
-rw-r--r--bench/SkBenchmark.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/bench/SkBenchmark.h b/bench/SkBenchmark.h
index bf28689236..00a816cdba 100644
--- a/bench/SkBenchmark.h
+++ b/bench/SkBenchmark.h
@@ -107,9 +107,8 @@ public:
fClearMask = clearMask;
}
- static void SetResourcePath(const char* resPath) { gResourcePath.set(resPath); }
-
- static SkString& GetResourcePath() { return gResourcePath; }
+ static void SetResourcePath(const char*);
+ static SkString GetResourcePath();
protected:
virtual void setupPaint(SkPaint* paint);
@@ -129,7 +128,7 @@ private:
bool fForceFilter;
SkTriState::State fDither;
uint32_t fOrMask, fClearMask;
- static SkString gResourcePath;
+ static const char* gResourcePath;
typedef SkRefCnt INHERITED;
};