Cleanup: Rename SkOSPath functions.
Mostly for brevity and matches better with Python:
Python | Old C++ | New C++
os.path.join | SkOSPath::SkPathJoin | SkOSPath::Join
os.path.basename | SkOSPath::SkBasename | SkOSPath::Basename
BUG=None
TEST=make all
R=mtklein@google.com, bsalomon@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/428443002
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index a4717f8..b03f898 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -20,7 +20,7 @@
SkString fName;
public:
DecodeBench(SkColorType ct) : fPrefColorType(ct) {
- SkString fname = SkOSPath::SkBasename(FLAGS_decodeBenchFilename[0]);
+ SkString fname = SkOSPath::Basename(FLAGS_decodeBenchFilename[0]);
fName.printf("decode_%s_%s", sk_tool_utils::colortype_name(ct), fname.c_str());
}
diff --git a/bench/ImageDecodeBench.cpp b/bench/ImageDecodeBench.cpp
index 47993cf..3ce2fb0 100644
--- a/bench/ImageDecodeBench.cpp
+++ b/bench/ImageDecodeBench.cpp
@@ -25,7 +25,7 @@
, fFilename(filename)
, fStream()
, fValid(false) {
- fName.append(SkOSPath::SkBasename(filename));
+ fName.append(SkOSPath::Basename(filename));
}
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp
index 30d9377..fc25f8b 100644
--- a/bench/SkipZeroesBench.cpp
+++ b/bench/SkipZeroesBench.cpp
@@ -52,8 +52,7 @@
return;
}
- SkString fullPath = SkOSPath::SkPathJoin(resourcePath.c_str(),
- fFilename.c_str());
+ SkString fullPath = SkOSPath::Join(resourcePath.c_str(), fFilename.c_str());
SkFILEStream fileStream(fullPath.c_str());
fValid = fileStream.isValid() && fileStream.getLength() > 0;
if (fValid) {
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index f3fdb9f..9c5f0e9 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -108,7 +108,7 @@
SkString filename;
make_filename(name, &filename);
filename.appendf("_%s.png", config);
- SkString path = SkOSPath::SkPathJoin(dir, filename.c_str());
+ SkString path = SkOSPath::Join(dir, filename.c_str());
::remove(path.c_str());
SkFILEWStream stream(path.c_str());