OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "SampleApp.h" | 7 #include "SampleApp.h" |
8 | 8 |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 break; | 808 break; |
809 } | 809 } |
810 } | 810 } |
811 | 811 |
812 if (sort) { | 812 if (sort) { |
813 // Sort samples, so foo.skp and foo.pdf are consecutive and we can quick
ly spot where | 813 // Sort samples, so foo.skp and foo.pdf are consecutive and we can quick
ly spot where |
814 // skp -> pdf -> png fails. | 814 // skp -> pdf -> png fails. |
815 SkTQSort(fSamples.begin(), fSamples.end() ? fSamples.end() - 1 : NULL, c
ompareSampleTitle); | 815 SkTQSort(fSamples.begin(), fSamples.end() ? fSamples.end() - 1 : NULL, c
ompareSampleTitle); |
816 } | 816 } |
817 | 817 |
818 const char* resourcePath = NULL; | 818 const char* resourcePath = "resources"; // same default as tests |
819 fMSAASampleCount = 0; | 819 fMSAASampleCount = 0; |
820 | 820 |
821 const char* const commandName = argv[0]; | 821 const char* const commandName = argv[0]; |
822 char* const* stop = argv + argc; | 822 char* const* stop = argv + argc; |
823 for (++argv; argv < stop; ++argv) { | 823 for (++argv; argv < stop; ++argv) { |
824 if (!strcmp(*argv, "-i") || !strcmp(*argv, "--resourcePath")) { | 824 if (!strcmp(*argv, "-i") || !strcmp(*argv, "--resourcePath")) { |
825 argv++; | 825 argv++; |
826 if (argv < stop && **argv) { | 826 if (argv < stop && **argv) { |
827 resourcePath = *argv; | 827 resourcePath = *argv; |
828 } | 828 } |
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 SkGraphics::Init(); | 2616 SkGraphics::Init(); |
2617 SkEvent::Init(); | 2617 SkEvent::Init(); |
2618 } | 2618 } |
2619 | 2619 |
2620 // FIXME: this should be in a header | 2620 // FIXME: this should be in a header |
2621 void application_term(); | 2621 void application_term(); |
2622 void application_term() { | 2622 void application_term() { |
2623 SkEvent::Term(); | 2623 SkEvent::Term(); |
2624 SkGraphics::Term(); | 2624 SkGraphics::Term(); |
2625 } | 2625 } |
OLD | NEW |