| 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 | 7 |
| 8 #include "SampleApp.h" | 8 #include "SampleApp.h" |
| 9 | 9 |
| 10 #include "OverView.h" | 10 #include "OverView.h" |
| (...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 // FIXME: this should be in a header | 2374 // FIXME: this should be in a header |
| 2375 void get_preferred_size(int* x, int* y, int* width, int* height); | 2375 void get_preferred_size(int* x, int* y, int* width, int* height); |
| 2376 void get_preferred_size(int* x, int* y, int* width, int* height) { | 2376 void get_preferred_size(int* x, int* y, int* width, int* height) { |
| 2377 *x = 10; | 2377 *x = 10; |
| 2378 *y = 50; | 2378 *y = 50; |
| 2379 *width = 640; | 2379 *width = 640; |
| 2380 *height = 480; | 2380 *height = 480; |
| 2381 } | 2381 } |
| 2382 | 2382 |
| 2383 #ifdef SK_BUILD_FOR_IOS | 2383 #ifdef SK_BUILD_FOR_IOS |
| 2384 #include "SkApplication.h" |
| 2384 IOS_launch_type set_cmd_line_args(int , char *[], const char* resourceDir) { | 2385 IOS_launch_type set_cmd_line_args(int , char *[], const char* resourceDir) { |
| 2385 SetResourcePath(resourceDir); | 2386 SetResourcePath(resourceDir); |
| 2386 return kApplication__iOSLaunchType; | 2387 return kApplication__iOSLaunchType; |
| 2387 } | 2388 } |
| 2388 #endif | 2389 #endif |
| 2389 | 2390 |
| 2390 void application_init() { | 2391 void application_init() { |
| 2391 // setenv("ANDROID_ROOT", "../../../data", 0); | 2392 // setenv("ANDROID_ROOT", "../../../data", 0); |
| 2392 #ifdef SK_BUILD_FOR_MAC | 2393 #ifdef SK_BUILD_FOR_MAC |
| 2393 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2394 setenv("ANDROID_ROOT", "/android/device/data", 0); |
| 2394 #endif | 2395 #endif |
| 2395 SkGraphics::Init(); | 2396 SkGraphics::Init(); |
| 2396 SkEvent::Init(); | 2397 SkEvent::Init(); |
| 2397 } | 2398 } |
| 2398 | 2399 |
| 2399 void application_term() { | 2400 void application_term() { |
| 2400 SkEvent::Term(); | 2401 SkEvent::Term(); |
| 2401 SkGraphics::Term(); | 2402 SkGraphics::Term(); |
| 2402 } | 2403 } |
| OLD | NEW |