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

Side by Side Diff: experimental/iOSSampleApp/Shared/skia_ios.mm

Issue 389653004: share dm and command flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sync up with latest dm Created 6 years, 5 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
« no previous file with comments | « experimental/SimpleiOSApp/SimpleApp.mm ('k') | gyp/bench.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 #include "SkApplication.h" 2 #include "SkApplication.h"
3 3
4 extern bool set_cmd_line_args(int argc, char *argv[], const char* dir);
5
6 int main(int argc, char *argv[]) { 4 int main(int argc, char *argv[]) {
7 signal(SIGPIPE, SIG_IGN); 5 signal(SIGPIPE, SIG_IGN);
8 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 6 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
9 application_init(); 7 application_init();
10 // Identify the documents directory 8 // Identify the documents directory
11 NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 9 NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
12 NSString *docsDir = [dirPaths objectAtIndex:0]; 10 NSString *docsDir = [dirPaths objectAtIndex:0];
13 const char *d = [docsDir UTF8String]; 11 const char *d = [docsDir UTF8String];
14 12 IOS_launch_type launchType = set_cmd_line_args(argc, argv, d);
15 bool ranCommand = set_cmd_line_args(argc, argv, d); 13 int retVal = launchType == kApplication__iOSLaunchType
16 int retVal = ranCommand ? 0 : UIApplicationMain(argc, argv, nil, nil); 14 ? UIApplicationMain(argc, argv, nil, nil) : (int) launchType;
17 application_term(); 15 application_term();
18 [pool release]; 16 [pool release];
19 return retVal; 17 return retVal;
20 } 18 }
OLDNEW
« no previous file with comments | « experimental/SimpleiOSApp/SimpleApp.mm ('k') | gyp/bench.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698