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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkCommandLineFlags.h" | 10 #include "SkCommandLineFlags.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 break; | 150 break; |
151 } | 151 } |
152 if (sk_isdir(readPath)) { | 152 if (sk_isdir(readPath)) { |
153 const char* dir = readPath; | 153 const char* dir = readPath; |
154 SkOSFile::Iter iter(dir); | 154 SkOSFile::Iter iter(dir); |
155 SkString filename; | 155 SkString filename; |
156 while (iter.next(&filename)) { | 156 while (iter.next(&filename)) { |
157 if (!is_image_file(filename.c_str())) { | 157 if (!is_image_file(filename.c_str())) { |
158 continue; | 158 continue; |
159 } | 159 } |
160 SkString fullname = SkOSPath::SkPathJoin(dir, filename.c_str()); | 160 SkString fullname = SkOSPath::Join(dir, filename.c_str()); |
161 decodeFileAndWrite(fullname.c_str()); | 161 decodeFileAndWrite(fullname.c_str()); |
162 } | 162 } |
163 } else if (sk_exists(readPath) && is_image_file(readPath)) { | 163 } else if (sk_exists(readPath) && is_image_file(readPath)) { |
164 decodeFileAndWrite(readPath); | 164 decodeFileAndWrite(readPath); |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 return 0; | 168 return 0; |
169 } | 169 } |
170 | 170 |
171 #if !defined SK_BUILD_FOR_IOS | 171 #if !defined SK_BUILD_FOR_IOS |
172 int main(int argc, char * const argv[]) { | 172 int main(int argc, char * const argv[]) { |
173 return tool_main(argc, (char**) argv); | 173 return tool_main(argc, (char**) argv); |
174 } | 174 } |
175 #endif | 175 #endif |
OLD | NEW |