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

Side by Side Diff: platform_tools/android/visualbench/jni/main.cpp

Issue 1241923002: Fix for android command line arguments to VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « platform_tools/android/bin/android_launch_app ('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 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
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
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 }
OLDNEW
« no previous file with comments | « platform_tools/android/bin/android_launch_app ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698