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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 132513003: SampleApp Cleanup (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: final rebase Created 6 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | samplecode/SampleDitherBitmap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleDitherBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698