OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Skia | 3 * Copyright 2011 Skia |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "com_skia_SkiaSampleRenderer.h" | 8 #include "com_skia_SkiaSampleRenderer.h" |
9 | 9 |
10 #include "SampleApp.h" | 10 #include "SampleApp.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 env->DeleteLocalRef(clazz); | 194 env->DeleteLocalRef(clazz); |
195 | 195 |
196 application_init(); | 196 application_init(); |
197 SkTArray<const char*> args; | 197 SkTArray<const char*> args; |
198 | 198 |
199 args.push_back("SampleApp"); | 199 args.push_back("SampleApp"); |
200 // TODO: push ability to select skp dir into the UI | 200 // TODO: push ability to select skp dir into the UI |
201 args.push_back("--pictureDir"); | 201 args.push_back("--pictureDir"); |
202 args.push_back("/sdcard/skiabot/skia_skp"); | 202 args.push_back("/sdcard/skiabot/skia_skp"); |
203 | 203 |
| 204 args.push_back("--resourcePath"); |
| 205 args.push_back("/data/local/tmp/skia/resources/"); |
| 206 |
204 SkString msaaSampleCountString; | 207 SkString msaaSampleCountString; |
205 if (msaaSampleCount > 0) { | 208 if (msaaSampleCount > 0) { |
206 args.push_back("--msaa"); | 209 args.push_back("--msaa"); |
207 msaaSampleCountString.appendS32(static_cast<uint32_t>(msaaSampleCount)); | 210 msaaSampleCountString.appendS32(static_cast<uint32_t>(msaaSampleCount)); |
208 args.push_back(msaaSampleCountString.c_str()); | 211 args.push_back(msaaSampleCountString.c_str()); |
209 } | 212 } |
210 | 213 |
211 gWindow = new SampleWindow(NULL, args.count(), const_cast<char**>(args.begin
()), NULL); | 214 gWindow = new SampleWindow(NULL, args.count(), const_cast<char**>(args.begin
()), NULL); |
212 | 215 |
213 // send the list of slides up to the activity | 216 // send the list of slides up to the activity |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 JNIEnv* env, jobject thiz) | 348 JNIEnv* env, jobject thiz) |
346 { | 349 { |
347 gWindow->saveToPdf(); | 350 gWindow->saveToPdf(); |
348 } | 351 } |
349 | 352 |
350 JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_postInval( | 353 JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_postInval( |
351 JNIEnv* env, jobject thiz) | 354 JNIEnv* env, jobject thiz) |
352 { | 355 { |
353 gWindow->postInvalDelay(); | 356 gWindow->postInvalDelay(); |
354 } | 357 } |
OLD | NEW |