OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 8 |
9 #include <android_native_app_glue.h> | 9 #include <android_native_app_glue.h> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 jobject intent = env->CallObjectMethod(me, giid); //Got our intent | 83 jobject intent = env->CallObjectMethod(me, giid); //Got our intent |
84 | 84 |
85 jclass icl = env->GetObjectClass(intent); //class pointer of Intent | 85 jclass icl = env->GetObjectClass(intent); //class pointer of Intent |
86 jmethodID gseid = env->GetMethodID(icl, "getStringExtra", | 86 jmethodID gseid = env->GetMethodID(icl, "getStringExtra", |
87 "(Ljava/lang/String;)Ljava/lang/String;")
; | 87 "(Ljava/lang/String;)Ljava/lang/String;")
; |
88 | 88 |
89 jstring jsParam1 = (jstring)env->CallObjectMethod(intent, gseid, | 89 jstring jsParam1 = (jstring)env->CallObjectMethod(intent, gseid, |
90 env->NewStringUTF("cmdLine
Flags")); | 90 env->NewStringUTF("cmdLine
Flags")); |
91 if (jsParam1) { | 91 if (jsParam1) { |
92 const char* flags = env->GetStringUTFChars(jsParam1, 0); | 92 const char* flags = env->GetStringUTFChars(jsParam1, 0); |
93 SkTArray<SkString> flagEntries; | |
94 SkStrSplit(flags, " ", &visualBenchState.fFlags); | 93 SkStrSplit(flags, " ", &visualBenchState.fFlags); |
95 env->ReleaseStringUTFChars(jsParam1, flags); | 94 env->ReleaseStringUTFChars(jsParam1, flags); |
96 } | 95 } |
97 jvm->DetachCurrentThread(); | 96 jvm->DetachCurrentThread(); |
98 | 97 |
99 while (1) { | 98 while (1) { |
100 // Read all pending events. | 99 // Read all pending events. |
101 int ident; | 100 int ident; |
102 int events; | 101 int events; |
103 struct android_poll_source* source; | 102 struct android_poll_source* source; |
(...skipping 22 matching lines...) Expand all Loading... |
126 | 125 |
127 if (kDestroyRequested_State == visualBenchState.fState) { | 126 if (kDestroyRequested_State == visualBenchState.fState) { |
128 SkDELETE(visualBenchState.fWindow); | 127 SkDELETE(visualBenchState.fWindow); |
129 visualBenchState.fWindow = NULL; | 128 visualBenchState.fWindow = NULL; |
130 application_term(); | 129 application_term(); |
131 ANativeActivity_finish(state->activity); | 130 ANativeActivity_finish(state->activity); |
132 visualBenchState.fState = kFinished_State; | 131 visualBenchState.fState = kFinished_State; |
133 } | 132 } |
134 } | 133 } |
135 } | 134 } |
OLD | NEW |