Loading opengl/tests/gl_perfapp/AndroidManifest.xml +3 −1 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.glperf"> package="com.android.glperf" android:versionName="1.0.0" android:versionCode="10000" > <uses-sdk android:targetSdkVersion="7" android:minSdkVersion="7" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:label="@string/glperf_activity"> <activity android:name="GLPerfActivity" Loading opengl/tests/gl_perfapp/jni/gl_code.cpp +19 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <stdlib.h> #include <math.h> FILE * out; static void printGLString(const char *name, GLenum s) { const char *v = (const char *) glGetString(s); LOGI("GL %s = %s\n", name, v); Loading Loading @@ -122,6 +124,7 @@ void endTimer(const char *str, int w, int h, double dc, int count) { double dc60 = pixels / delta / (w * h) / 60; LOGI("%s, %f, %f\n", str, mpps, dc60); if (out) fprintf(out, "%s, %f, %f\r\n", str, mpps, dc60); } static const char gVertexShader[] = Loading Loading @@ -247,7 +250,7 @@ static void setupVA() { ////////////////////////// // Tells us what to draw next // Width and height of the screen uint32_t w; uint32_t h; Loading @@ -259,6 +262,8 @@ const int doLoopStates = 2; const int doSingleTestStates = 2; bool done; // Saves the parameters of the test (so we can print them out when we finish the timing.) char saveBuf[1024]; static void doLoop(uint32_t w, uint32_t h, const char *str) { Loading Loading @@ -386,8 +391,13 @@ void doTest(uint32_t w, uint32_t h) { testSubState = testState % 8; } if (texCount >= 3) { // LOGI("done\n"); LOGI("done\n"); if (out) { fclose(out); out = NULL; } done = true; exit(0); return; } Loading Loading @@ -436,8 +446,15 @@ JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobj done = false; setupVA(); genTextures(); const char* fileName = "/sdcard/glperf.csv"; LOGI("Writing to: %s\n",fileName); out = fopen(fileName, "w"); if (out == NULL) { LOGE("Could not open: %s\n", fileName); } LOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n"); if (out) fprintf(out,"\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\r\n"); } JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj) Loading Loading
opengl/tests/gl_perfapp/AndroidManifest.xml +3 −1 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.glperf"> package="com.android.glperf" android:versionName="1.0.0" android:versionCode="10000" > <uses-sdk android:targetSdkVersion="7" android:minSdkVersion="7" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:label="@string/glperf_activity"> <activity android:name="GLPerfActivity" Loading
opengl/tests/gl_perfapp/jni/gl_code.cpp +19 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ #include <stdlib.h> #include <math.h> FILE * out; static void printGLString(const char *name, GLenum s) { const char *v = (const char *) glGetString(s); LOGI("GL %s = %s\n", name, v); Loading Loading @@ -122,6 +124,7 @@ void endTimer(const char *str, int w, int h, double dc, int count) { double dc60 = pixels / delta / (w * h) / 60; LOGI("%s, %f, %f\n", str, mpps, dc60); if (out) fprintf(out, "%s, %f, %f\r\n", str, mpps, dc60); } static const char gVertexShader[] = Loading Loading @@ -247,7 +250,7 @@ static void setupVA() { ////////////////////////// // Tells us what to draw next // Width and height of the screen uint32_t w; uint32_t h; Loading @@ -259,6 +262,8 @@ const int doLoopStates = 2; const int doSingleTestStates = 2; bool done; // Saves the parameters of the test (so we can print them out when we finish the timing.) char saveBuf[1024]; static void doLoop(uint32_t w, uint32_t h, const char *str) { Loading Loading @@ -386,8 +391,13 @@ void doTest(uint32_t w, uint32_t h) { testSubState = testState % 8; } if (texCount >= 3) { // LOGI("done\n"); LOGI("done\n"); if (out) { fclose(out); out = NULL; } done = true; exit(0); return; } Loading Loading @@ -436,8 +446,15 @@ JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobj done = false; setupVA(); genTextures(); const char* fileName = "/sdcard/glperf.csv"; LOGI("Writing to: %s\n",fileName); out = fopen(fileName, "w"); if (out == NULL) { LOGE("Could not open: %s\n", fileName); } LOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n"); if (out) fprintf(out,"\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\r\n"); } JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj) Loading