| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkDebugCanvas.h" | 8 #include "SkDebugCanvas.h" |
| 9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
| 10 #include "SkForceLinking.h" | 10 #include "SkForceLinking.h" |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 return -1; | 809 return -1; |
| 810 } | 810 } |
| 811 } | 811 } |
| 812 | 812 |
| 813 SkOSFile::Iter iter(inDir.c_str(), "skp"); | 813 SkOSFile::Iter iter(inDir.c_str(), "skp"); |
| 814 | 814 |
| 815 SkString inputFilename, outputFilename; | 815 SkString inputFilename, outputFilename; |
| 816 if (iter.next(&inputFilename)) { | 816 if (iter.next(&inputFilename)) { |
| 817 | 817 |
| 818 do { | 818 do { |
| 819 inFile = SkOSPath::SkPathJoin(inDir.c_str(), inputFilename.c_str()); | 819 inFile = SkOSPath::Join(inDir.c_str(), inputFilename.c_str()); |
| 820 if (!outDir.isEmpty()) { | 820 if (!outDir.isEmpty()) { |
| 821 outFile = SkOSPath::SkPathJoin(outDir.c_str(), inputFilename.c_s
tr()); | 821 outFile = SkOSPath::Join(outDir.c_str(), inputFilename.c_str()); |
| 822 } | 822 } |
| 823 SkDebugf("Executing %s\n", inputFilename.c_str()); | 823 SkDebugf("Executing %s\n", inputFilename.c_str()); |
| 824 filter_picture(inFile, outFile); | 824 filter_picture(inFile, outFile); |
| 825 } while(iter.next(&inputFilename)); | 825 } while(iter.next(&inputFilename)); |
| 826 | 826 |
| 827 } else if (!inFile.isEmpty()) { | 827 } else if (!inFile.isEmpty()) { |
| 828 filter_picture(inFile, outFile); | 828 filter_picture(inFile, outFile); |
| 829 } else { | 829 } else { |
| 830 usage(); | 830 usage(); |
| 831 return -1; | 831 return -1; |
| 832 } | 832 } |
| 833 | 833 |
| 834 for (size_t opt = 0; opt < SK_ARRAY_COUNT(gOptTable); ++opt) { | 834 for (size_t opt = 0; opt < SK_ARRAY_COUNT(gOptTable); ++opt) { |
| 835 SkDebugf("opt %d: %d\n", opt, gOptTable[opt].fNumTimesApplied); | 835 SkDebugf("opt %d: %d\n", opt, gOptTable[opt].fNumTimesApplied); |
| 836 } | 836 } |
| 837 | 837 |
| 838 SkGraphics::Term(); | 838 SkGraphics::Term(); |
| 839 return 0; | 839 return 0; |
| 840 } | 840 } |
| 841 | 841 |
| 842 #if !defined SK_BUILD_FOR_IOS | 842 #if !defined SK_BUILD_FOR_IOS |
| 843 int main(int argc, char * const argv[]) { | 843 int main(int argc, char * const argv[]) { |
| 844 return tool_main(argc, (char**) argv); | 844 return tool_main(argc, (char**) argv); |
| 845 } | 845 } |
| 846 #endif | 846 #endif |
| OLD | NEW |