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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 405653002: git sample app working on iOS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gyp/SampleApp.gyp ('k') | no next file » | 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 7
8 #include "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
11 #include "Resources.h"
11 #include "SampleCode.h" 12 #include "SampleCode.h"
12 #include "SamplePipeControllers.h" 13 #include "SamplePipeControllers.h"
13 #include "SkCanvas.h" 14 #include "SkCanvas.h"
14 #include "SkCommandLineFlags.h" 15 #include "SkCommandLineFlags.h"
15 #include "SkData.h" 16 #include "SkData.h"
16 #include "SkDevice.h" 17 #include "SkDevice.h"
17 #include "SkGPipe.h" 18 #include "SkGPipe.h"
18 #include "SkGraphics.h" 19 #include "SkGraphics.h"
19 #include "SkImageEncoder.h" 20 #include "SkImageEncoder.h"
20 #include "SkOSFile.h" 21 #include "SkOSFile.h"
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 // FIXME: this should be in a header 2379 // FIXME: this should be in a header
2379 void get_preferred_size(int* x, int* y, int* width, int* height); 2380 void get_preferred_size(int* x, int* y, int* width, int* height);
2380 void get_preferred_size(int* x, int* y, int* width, int* height) { 2381 void get_preferred_size(int* x, int* y, int* width, int* height) {
2381 *x = 10; 2382 *x = 10;
2382 *y = 50; 2383 *y = 50;
2383 *width = 640; 2384 *width = 640;
2384 *height = 480; 2385 *height = 480;
2385 } 2386 }
2386 2387
2387 #ifdef SK_BUILD_FOR_IOS 2388 #ifdef SK_BUILD_FOR_IOS
2388 void save_args(int argc, char *argv[]) { 2389 bool set_cmd_line_args(int , char *[], const char* resourceDir) {
2390 SetResourcePath(resourceDir);
2391 return false;
2389 } 2392 }
2390 #endif 2393 #endif
2391 2394
2392 // FIXME: this should be in a header 2395 // FIXME: this should be in a header
2393 void application_init(); 2396 void application_init();
2394 void application_init() { 2397 void application_init() {
2395 // setenv("ANDROID_ROOT", "../../../data", 0); 2398 // setenv("ANDROID_ROOT", "../../../data", 0);
2396 #ifdef SK_BUILD_FOR_MAC 2399 #ifdef SK_BUILD_FOR_MAC
2397 setenv("ANDROID_ROOT", "/android/device/data", 0); 2400 setenv("ANDROID_ROOT", "/android/device/data", 0);
2398 #endif 2401 #endif
2399 SkGraphics::Init(); 2402 SkGraphics::Init();
2400 SkEvent::Init(); 2403 SkEvent::Init();
2401 } 2404 }
2402 2405
2403 // FIXME: this should be in a header 2406 // FIXME: this should be in a header
2404 void application_term(); 2407 void application_term();
2405 void application_term() { 2408 void application_term() {
2406 SkEvent::Term(); 2409 SkEvent::Term();
2407 SkGraphics::Term(); 2410 SkGraphics::Term();
2408 } 2411 }
OLDNEW
« no previous file with comments | « gyp/SampleApp.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698