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

Unified Diff: bench/DecodeBench.cpp

Issue 170783012: Upstream fix for DecodeBench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DecodeBench.cpp
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index 3f535d2f7cc81055b1bf4320768ff346d7c1739f..a6ab4a5953bcf7927f5356284cd04a3397072a2d 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -9,6 +9,7 @@
#include "SkBitmap.h"
#include "SkCommandLineFlags.h"
#include "SkImageDecoder.h"
+#include "SkOSFile.h"
#include "SkString.h"
DEFINE_string(decodeBenchFilename, "resources/CMYK.jpeg", "Path to image for DecodeBench.");
@@ -24,11 +25,8 @@ public:
DecodeBench(SkBitmap::Config c) {
fPrefConfig = c;
- const char* fname = strrchr(FLAGS_decodeBenchFilename[0], '/');
- if (fname) {
- fname++; // skip the slash
- }
- fName.printf("decode_%s_%s", gConfigName[c], fname);
+ SkString fname = SkOSPath::SkBasename(FLAGS_decodeBenchFilename[0]);
+ fName.printf("decode_%s_%s", gConfigName[c], fname.c_str());
}
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698