diff options
Diffstat (limited to 'src/test/com/jogamp/opengl')
3 files changed, 17 insertions, 36 deletions
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java index 889e0944e..e850b9310 100644 --- a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java +++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java @@ -79,5 +79,20 @@ public class NEWTRedSquareES2Activity extends NewtBaseActivity { glWindow.resetFPSCounter(); Log.d(TAG, "onCreate - X"); - } + } + + @Override + public void onResume() { + // android.os.Debug.startMethodTracing("GearsES2.trace"); + // android.os.Debug.startAllocCounting(); + super.onResume(); + } + + @Override + public void onPause() { + // android.os.Debug.stopAllocCounting(); + // android.os.Debug.stopMethodTracing(); + super.onPause(); + } + } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java index 21aca0487..6246b3e87 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java @@ -179,10 +179,6 @@ public class GearsES2 implements GLEventListener { System.err.println(Thread.currentThread()+" GearsES2.init FIN"); } - public void enableAndroidTrace(boolean v) { - useAndroidDebug = v; - } - public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { // System.err.println(Thread.currentThread()+" GearsES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval); GL2ES2 gl = drawable.getGL().getGL2ES2(); @@ -205,24 +201,11 @@ public class GearsES2 implements GLEventListener { st.uniform(gl, pmvMatrixUniform); st.useProgram(gl, false); - if(useAndroidDebug) { - try { - android.os.Debug.startMethodTracing("GearsES2.trace"); - // android.os.Debug.startAllocCounting(); - useAndroidDebug = true; - } catch (NoClassDefFoundError e) { useAndroidDebug=false; } - } - // System.err.println(Thread.currentThread()+" GearsES2.reshape FIN"); } - private boolean useAndroidDebug = false; + // private boolean useAndroidDebug = false; public void dispose(GLAutoDrawable drawable) { - if(useAndroidDebug) { - // android.os.Debug.stopAllocCounting(); - android.os.Debug.stopMethodTracing(); - } - System.err.println(Thread.currentThread()+" GearsES2.dispose ... "); if (drawable instanceof Window) { Window window = (Window) drawable; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java index a24662568..620267125 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java @@ -156,10 +156,6 @@ public class RedSquareES2 implements GLEventListener { st.useProgram(gl, false); } - public void enableAndroidTrace(boolean v) { - useAndroidDebug = v; - } - public void reshape(GLAutoDrawable glad, int x, int y, int width, int height) { System.err.println(Thread.currentThread()+" RedSquareES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval); GL2ES2 gl = glad.getGL().getGL2ES2(); @@ -173,23 +169,10 @@ public class RedSquareES2 implements GLEventListener { st.uniform(gl, pmvMatrixUniform); st.useProgram(gl, false); - if(useAndroidDebug) { - try { - android.os.Debug.startMethodTracing("RedSquareES2.trace"); - // android.os.Debug.startAllocCounting(); - useAndroidDebug = true; - } catch (NoClassDefFoundError e) { useAndroidDebug=false; } - } - System.err.println(Thread.currentThread()+" RedSquareES2.reshape FIN"); } - private boolean useAndroidDebug = false; public void dispose(GLAutoDrawable glad) { - if(useAndroidDebug) { - // android.os.Debug.stopAllocCounting(); - android.os.Debug.stopMethodTracing(); - } System.err.println(Thread.currentThread()+" RedSquareES2.dispose ... "); if (null != glWindow) { glWindow.removeMouseListener(myMouse); |