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

Unified Diff: bench/SkipZeroesBench.cpp

Issue 321723002: Reland "Clean up Test's resourcePath code." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ETCBitmapBench fix 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 | « bench/SkBenchmark.cpp ('k') | gm/copyTo4444.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkipZeroesBench.cpp
diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp
index 3d846bf73ddfb145b9598baca9f893334722d06d..b84cf78169a742743a66da77abd9ea4a23a95ca0 100644
--- a/bench/SkipZeroesBench.cpp
+++ b/bench/SkipZeroesBench.cpp
@@ -45,13 +45,14 @@ protected:
}
virtual void onPreDraw() SK_OVERRIDE {
- const char* resPath = GetResourcePath().c_str();
- if (NULL == resPath) {
+ SkString resourcePath = GetResourcePath();
+ if (resourcePath.isEmpty()) {
fValid = false;
return;
}
- SkString fullPath = SkOSPath::SkPathJoin(resPath, fFilename.c_str());
+ SkString fullPath = SkOSPath::SkPathJoin(resourcePath.c_str(),
+ fFilename.c_str());
SkFILEStream fileStream(fullPath.c_str());
fValid = fileStream.isValid() && fileStream.getLength() > 0;
if (fValid) {
« no previous file with comments | « bench/SkBenchmark.cpp ('k') | gm/copyTo4444.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698