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

Unified Diff: dm/DM.cpp

Issue 88773002: DM: write failed comparison mode .pngs one more level deep in the tree. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: depth() instead Created 7 years, 1 month 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 | dm/DMTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 8c30fe6b55aebb8f8e0ee72df46be10bbced49ba..274ec2a815eb89f8aa6ab40d478da116f9df9050 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -6,6 +6,7 @@
#include "SkCommandLineFlags.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
+#include "SkString.h"
#include "gm.h"
#include "DMReporter.h"
@@ -39,19 +40,6 @@ DEFINE_string(config, "8888 gpu",
__SK_FORCE_IMAGE_DECODER_LINKING;
-// Split str on any characters in delimiters into out. (Think, strtok with a sane API.)
-static void split(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);
- }
-}
-
// "FooBar" -> "foobar". Obviously, ASCII only.
static SkString lowercase(SkString s) {
for (size_t i = 0; i < s.size(); i++) {
@@ -134,7 +122,7 @@ int tool_main(int argc, char** argv) {
GM::SetResourcePath(FLAGS_resources[0]);
SkTArray<SkString> configs;
for (int i = 0; i < FLAGS_config.count(); i++) {
- split(FLAGS_config[i], ", ", &configs);
+ SkStrSplit(FLAGS_config[i], ", ", &configs);
}
SkTDArray<GMRegistry::Factory> gms;
« no previous file with comments | « no previous file | dm/DMTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698