aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-26 22:06:12 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-26 22:06:12 +0000
commitca5bb87a31b8cfde73dfd7c554127ee9b3e1ab58 (patch)
tree78c15d3584564d64c43d1b81d4441de2e2c60949 /src
parentd8f82a4c44b844fed98d3ecc0072e0626b06bb37 (diff)
DM: write failed comparison mode .pngs one more level deep in the tree.
E.g. instead of having to compare /tmp/dm/565/optimizations.png vs. /tmp/dm/replay/optimizations_565.png it's now /tmp/dm/565/optimizations.png vs. /tmp/dm/replay/565/optimizations.png This lets working with skdiff go a lot more smoothly. BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/88773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12402 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkString.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index e30b89f199..643dfb1372 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -634,5 +634,17 @@ SkString SkStringPrintf(const char* format, ...) {
return formattedOutput;
}
+void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out) {
+ const char* end = str + strlen(str);
+ while (str != end) {
+ // Find a token.
+ const size_t len = strcspn(str, delimiters);
+ out->push_back().set(str, len);
+ str += len;
+ // Skip any delimiters.
+ str += strspn(str, delimiters);
+ }
+}
+
#undef VSNPRINTF
#undef SNPRINTF