| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "LazyDecodeBitmap.h" | 8 #include "LazyDecodeBitmap.h" |
| 9 #include "SkLua.h" | 9 #include "SkLua.h" |
| 10 #include "SkLuaCanvas.h" | 10 #include "SkLuaCanvas.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 for (int i = 0; i < FLAGS_skpPath.count(); i ++) { | 127 for (int i = 0; i < FLAGS_skpPath.count(); i ++) { |
| 128 SkTArray<SkString> paths; | 128 SkTArray<SkString> paths; |
| 129 if (sk_isdir(FLAGS_skpPath[i])) { | 129 if (sk_isdir(FLAGS_skpPath[i])) { |
| 130 // Add all .skp in this directory. | 130 // Add all .skp in this directory. |
| 131 const SkString directory(FLAGS_skpPath[i]); | 131 const SkString directory(FLAGS_skpPath[i]); |
| 132 SkString filename; | 132 SkString filename; |
| 133 SkOSFile::Iter iter(FLAGS_skpPath[i], "skp"); | 133 SkOSFile::Iter iter(FLAGS_skpPath[i], "skp"); |
| 134 while(iter.next(&filename)) { | 134 while(iter.next(&filename)) { |
| 135 sk_tools::make_filepath(&paths.push_back(), directory, filename)
; | 135 paths.push_back() = SkOSPath::SkPathJoin(directory.c_str(), file
name.c_str()); |
| 136 } | 136 } |
| 137 } else { | 137 } else { |
| 138 // Add this as an .skp itself. | 138 // Add this as an .skp itself. |
| 139 paths.push_back() = FLAGS_skpPath[i]; | 139 paths.push_back() = FLAGS_skpPath[i]; |
| 140 } | 140 } |
| 141 | 141 |
| 142 for (int i = 0; i < paths.count(); i++) { | 142 for (int i = 0; i < paths.count(); i++) { |
| 143 if (moduloRemainder >= 0) { | 143 if (moduloRemainder >= 0) { |
| 144 if ((i % moduloDivisor) != moduloRemainder) { | 144 if ((i % moduloDivisor) != moduloRemainder) { |
| 145 continue; | 145 continue; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 return 0; | 169 return 0; |
| 170 } | 170 } |
| 171 | 171 |
| 172 #if !defined SK_BUILD_FOR_IOS | 172 #if !defined SK_BUILD_FOR_IOS |
| 173 int main(int argc, char * const argv[]) { | 173 int main(int argc, char * const argv[]) { |
| 174 return tool_main(argc, (char**) argv); | 174 return tool_main(argc, (char**) argv); |
| 175 } | 175 } |
| 176 #endif | 176 #endif |
| OLD | NEW |