aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpdiff
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 /tools/skpdiff
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 'tools/skpdiff')
-rw-r--r--tools/skpdiff/SkDiffContext.cpp20
-rw-r--r--tools/skpdiff/skpdiff_util.cpp2
2 files changed, 11 insertions, 11 deletions
diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp
index 26898c92f3..ea44c90da1 100644
--- a/tools/skpdiff/SkDiffContext.cpp
+++ b/tools/skpdiff/SkDiffContext.cpp
@@ -98,8 +98,8 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) {
fRecordMutex.release();
// compute the common name
- SkString baseName = SkOSPath::SkBasename(baselinePath);
- SkString testName = SkOSPath::SkBasename(testPath);
+ SkString baseName = SkOSPath::Basename(baselinePath);
+ SkString testName = SkOSPath::Basename(testPath);
newRecord->fCommonName = get_common_prefix(baseName, testName);
newRecord->fBaselinePath = baselinePath;
@@ -134,8 +134,8 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) {
&& !diffData.fResult.poiAlphaMask.empty()
&& !newRecord->fCommonName.isEmpty()) {
- newRecord->fAlphaMaskPath = SkOSPath::SkPathJoin(fAlphaMaskDir.c_str(),
- newRecord->fCommonName.c_str());
+ newRecord->fAlphaMaskPath = SkOSPath::Join(fAlphaMaskDir.c_str(),
+ newRecord->fCommonName.c_str());
// compute the image diff and output it
SkBitmap copy;
@@ -163,8 +163,8 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) {
newRecord->fMaxGreenDiff = diffData.fResult.maxGreenDiff;
newRecord->fMaxBlueDiff = diffData.fResult.maxBlueDiff;
- newRecord->fRgbDiffPath = SkOSPath::SkPathJoin(fRgbDiffDir.c_str(),
- newRecord->fCommonName.c_str());
+ newRecord->fRgbDiffPath = SkOSPath::Join(fRgbDiffDir.c_str(),
+ newRecord->fCommonName.c_str());
SkImageEncoder::EncodeFile(newRecord->fRgbDiffPath.c_str(),
diffData.fResult.rgbDiffBitmap,
SkImageEncoder::kPNG_Type, 100);
@@ -176,8 +176,8 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) {
&& SkImageDiffer::RESULT_CORRECT != diffData.fResult.result
&& !diffData.fResult.whiteDiffBitmap.empty()
&& !newRecord->fCommonName.isEmpty()) {
- newRecord->fWhiteDiffPath = SkOSPath::SkPathJoin(fWhiteDiffDir.c_str(),
- newRecord->fCommonName.c_str());
+ newRecord->fWhiteDiffPath = SkOSPath::Join(fWhiteDiffDir.c_str(),
+ newRecord->fCommonName.c_str());
SkImageEncoder::EncodeFile(newRecord->fWhiteDiffPath.c_str(),
diffData.fResult.whiteDiffBitmap,
SkImageEncoder::kPNG_Type, 100);
@@ -223,8 +223,8 @@ void SkDiffContext::diffDirectories(const char baselinePath[], const char testPa
const char* baseFilename = baselineEntries[x].c_str();
// Find the real location of each file to compare
- SkString baselineFile = SkOSPath::SkPathJoin(baselinePath, baseFilename);
- SkString testFile = SkOSPath::SkPathJoin(testPath, baseFilename);
+ SkString baselineFile = SkOSPath::Join(baselinePath, baseFilename);
+ SkString testFile = SkOSPath::Join(testPath, baseFilename);
// Check that the test file exists and is a file
if (sk_exists(testFile.c_str()) && !sk_isdir(testFile.c_str())) {
diff --git a/tools/skpdiff/skpdiff_util.cpp b/tools/skpdiff/skpdiff_util.cpp
index 983bee20b3..4a92f5e3f7 100644
--- a/tools/skpdiff/skpdiff_util.cpp
+++ b/tools/skpdiff/skpdiff_util.cpp
@@ -117,7 +117,7 @@ bool get_directory(const char path[], SkTArray<SkString>* entries) {
while ((entry = readdir(dir))) {
// dirent only gives relative paths, we need to join them to the base path to check if they
// are directories.
- SkString joinedPath = SkOSPath::SkPathJoin(path, entry->d_name);
+ SkString joinedPath = SkOSPath::Join(path, entry->d_name);
// We only care about files
if (!sk_isdir(joinedPath.c_str())) {