aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar tfarina <tfarina@chromium.org>2014-07-28 19:26:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-28 19:26:58 -0700
commita8e2e1504b9af6ba791637f228debaa23953064a (patch)
treec4dc50d10bb27a4bfd263f877cb7d602f6779afc /dm
parent2bff230d835fbc84f0ce8b2e7a399fe8416ec7c8 (diff)
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
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp5
-rw-r--r--dm/DMWriteTask.cpp8
2 files changed, 6 insertions, 7 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 0077d5ac1b..13079ca42f 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -128,8 +128,7 @@ static void find_skps(SkTArray<SkString>* skps) {
SkString filename;
while (it.next(&filename)) {
if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) {
- skps->push_back(
- SkOSPath::SkPathJoin(FLAGS_skps[0], filename.c_str()));
+ skps->push_back(SkOSPath::Join(FLAGS_skps[0], filename.c_str()));
}
}
}
@@ -148,7 +147,7 @@ static void kick_off_skps(const SkTArray<SkString>& skps,
exit(1);
}
- SkString filename = SkOSPath::SkBasename(skps[i].c_str());
+ SkString filename = SkOSPath::Basename(skps[i].c_str());
tasks->add(SkNEW_ARGS(DM::SKPTask, (reporter, tasks, pic, filename)));
tasks->add(SkNEW_ARGS(DM::PDFTask, (reporter, tasks, pic, filename,
RASTERIZE_PDF_PROC)));
diff --git a/dm/DMWriteTask.cpp b/dm/DMWriteTask.cpp
index b90e44a2aa..5435087535 100644
--- a/dm/DMWriteTask.cpp
+++ b/dm/DMWriteTask.cpp
@@ -136,11 +136,11 @@ void WriteTask::draw() {
#endif
this->makeDirOrFail(dir);
for (int i = 0; i < fSuffixes.count(); i++) {
- dir = SkOSPath::SkPathJoin(dir.c_str(), fSuffixes[i].c_str());
+ dir = SkOSPath::Join(dir.c_str(), fSuffixes[i].c_str());
this->makeDirOrFail(dir);
}
- SkString path = SkOSPath::SkPathJoin(dir.c_str(), fGmName.c_str());
+ SkString path = SkOSPath::Join(dir.c_str(), fGmName.c_str());
path.append(fExtension);
const bool ok = fData.get() ? save_data_to_file(fData, path.c_str())
@@ -173,13 +173,13 @@ static SkString path_to_expected_image(const char* root, const Task& task) {
SkASSERT(1 == suffixes.count());
// We'll look in root/suffix for images.
- const SkString dir = SkOSPath::SkPathJoin(root, suffixes[0].c_str());
+ const SkString dir = SkOSPath::Join(root, suffixes[0].c_str());
// Remove the suffix and tack on a .png.
filename.remove(filename.size() - suffixLength, suffixLength);
filename.append(".png");
- return SkOSPath::SkPathJoin(dir.c_str(), filename.c_str());
+ return SkOSPath::Join(dir.c_str(), filename.c_str());
}
bool WriteTask::Expectations::check(const Task& task, SkBitmap bitmap) const {