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

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

Issue 1054073003: Minimal Changes to run tests on iOS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years, 8 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 | « no previous file | src/core/SkImageFilter.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 /*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
1 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
2 #include "SkApplication.h" 8 #include "SkApplication.h"
3 9
4 int main(int argc, char *argv[]) { 10 int main(int argc, char *argv[]) {
5 signal(SIGPIPE, SIG_IGN); 11 signal(SIGPIPE, SIG_IGN);
6 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 12 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
7 application_init(); 13 application_init();
14
8 // Identify the documents directory 15 // Identify the documents directory
9 NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 16 NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
10 NSString *docsDir = [dirPaths objectAtIndex:0]; 17 NSString *docsDir = [dirPaths objectAtIndex:0];
11 const char *d = [docsDir UTF8String]; 18 NSString *resourceDir = [docsDir stringByAppendingString:@"/resources"];
12 IOS_launch_type launchType = set_cmd_line_args(argc, argv, d); 19 const char *d = [resourceDir UTF8String];
13 int retVal = launchType == kApplication__iOSLaunchType 20
14 ? UIApplicationMain(argc, argv, nil, nil) : (int) launchType; 21 // change to the dcouments directory. To allow the 'writePath' flag to use r elative paths.
22 NSFileManager *filemgr = [NSFileManager defaultManager];
23 int retVal = 99;
24 if ([filemgr changeCurrentDirectoryPath: docsDir] == YES)
25 {
26 IOS_launch_type launchType = set_cmd_line_args(argc, argv, d);
27 retVal = launchType == kApplication__iOSLaunchType
28 ? UIApplicationMain(argc, argv, nil, nil) : (int) launchType;
29 }
15 application_term(); 30 application_term();
31 [filemgr release];
16 [pool release]; 32 [pool release];
17 return retVal; 33 return retVal;
18 } 34 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698