Loading api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -27230,7 +27230,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -27254,6 +27254,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1 api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -29221,7 +29221,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -29245,6 +29245,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1 api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -27238,7 +27238,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -27262,6 +27262,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1 opengl/java/android/opengl/GLSurfaceView.java +35 −5 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ import android.view.SurfaceView; * </pre> * */ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback { public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback2 { private final static String TAG = "GLSurfaceView"; private final static boolean LOG_ATTACH_DETACH = false; private final static boolean LOG_THREADS = false; Loading Loading @@ -541,6 +541,16 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mGLThread.onWindowResize(w, h); } /** * This method is part of the SurfaceHolder.Callback interface, and is * not normally called or subclassed by clients of GLSurfaceView. */ @Override public void surfaceRedrawNeeded(SurfaceHolder holder) { mGLThread.requestRenderAndWait(); } /** * Inform the view that the activity is paused. The owner of this view must * call this method when the activity is paused. Calling this method will Loading Loading @@ -1226,6 +1236,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mHeight = 0; mRequestRender = true; mRenderMode = RENDERMODE_CONTINUOUSLY; mWantRenderNotification = false; mGLSurfaceViewWeakRef = glSurfaceViewWeakRef; } Loading Loading @@ -1271,6 +1282,8 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mEglHelper = new EglHelper(mGLSurfaceViewWeakRef); mHaveEglContext = false; mHaveEglSurface = false; mWantRenderNotification = false; try { GL10 gl = null; boolean createEglContext = false; Loading @@ -1278,7 +1291,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback boolean createGlInterface = false; boolean lostEglContext = false; boolean sizeChanged = false; boolean wantRenderNotification = false; boolean doRenderNotification = false; boolean askedToReleaseEglContext = false; int w = 0; Loading Loading @@ -1383,7 +1395,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback if (LOG_SURFACE) { Log.i("GLThread", "sending render notification tid=" + getId()); } wantRenderNotification = false; mWantRenderNotification = false; doRenderNotification = false; mRenderComplete = true; sGLThreadManager.notifyAll(); Loading Loading @@ -1422,7 +1434,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback sizeChanged = true; w = mWidth; h = mHeight; wantRenderNotification = true; mWantRenderNotification = true; if (LOG_SURFACE) { Log.i("GLThread", "noticing that we want render notification tid=" Loading Loading @@ -1562,7 +1574,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback break; } if (wantRenderNotification) { if (mWantRenderNotification) { doRenderNotification = true; } } Loading Loading @@ -1611,6 +1623,23 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } } public void requestRenderAndWait() { synchronized(sGLThreadManager) { mWantRenderNotification = true; mRequestRender = true; mRenderComplete = false; sGLThreadManager.notifyAll(); while (!mExited && !mPaused && mRenderComplete == false) { try { sGLThreadManager.wait(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } } } public void surfaceCreated() { synchronized(sGLThreadManager) { if (LOG_THREADS) { Loading Loading @@ -1766,6 +1795,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback private int mHeight; private int mRenderMode; private boolean mRequestRender; private boolean mWantRenderNotification; private boolean mRenderComplete; private ArrayList<Runnable> mEventQueue = new ArrayList<Runnable>(); private boolean mSizeChanged = true; Loading Loading
api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -27230,7 +27230,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -27254,6 +27254,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1
api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -29221,7 +29221,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -29245,6 +29245,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1
api/test-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -27238,7 +27238,7 @@ package android.opengl { ctor public GLException(int, java.lang.String); } public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback { public class GLSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback2 { ctor public GLSurfaceView(android.content.Context); ctor public GLSurfaceView(android.content.Context, android.util.AttributeSet); method public int getDebugFlags(); Loading @@ -27262,6 +27262,7 @@ package android.opengl { method public void surfaceChanged(android.view.SurfaceHolder, int, int, int); method public void surfaceCreated(android.view.SurfaceHolder); method public void surfaceDestroyed(android.view.SurfaceHolder); method public void surfaceRedrawNeeded(android.view.SurfaceHolder); field public static final int DEBUG_CHECK_GL_ERROR = 1; // 0x1 field public static final int DEBUG_LOG_GL_CALLS = 2; // 0x2 field public static final int RENDERMODE_CONTINUOUSLY = 1; // 0x1
opengl/java/android/opengl/GLSurfaceView.java +35 −5 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ import android.view.SurfaceView; * </pre> * */ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback { public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback2 { private final static String TAG = "GLSurfaceView"; private final static boolean LOG_ATTACH_DETACH = false; private final static boolean LOG_THREADS = false; Loading Loading @@ -541,6 +541,16 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mGLThread.onWindowResize(w, h); } /** * This method is part of the SurfaceHolder.Callback interface, and is * not normally called or subclassed by clients of GLSurfaceView. */ @Override public void surfaceRedrawNeeded(SurfaceHolder holder) { mGLThread.requestRenderAndWait(); } /** * Inform the view that the activity is paused. The owner of this view must * call this method when the activity is paused. Calling this method will Loading Loading @@ -1226,6 +1236,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mHeight = 0; mRequestRender = true; mRenderMode = RENDERMODE_CONTINUOUSLY; mWantRenderNotification = false; mGLSurfaceViewWeakRef = glSurfaceViewWeakRef; } Loading Loading @@ -1271,6 +1282,8 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mEglHelper = new EglHelper(mGLSurfaceViewWeakRef); mHaveEglContext = false; mHaveEglSurface = false; mWantRenderNotification = false; try { GL10 gl = null; boolean createEglContext = false; Loading @@ -1278,7 +1291,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback boolean createGlInterface = false; boolean lostEglContext = false; boolean sizeChanged = false; boolean wantRenderNotification = false; boolean doRenderNotification = false; boolean askedToReleaseEglContext = false; int w = 0; Loading Loading @@ -1383,7 +1395,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback if (LOG_SURFACE) { Log.i("GLThread", "sending render notification tid=" + getId()); } wantRenderNotification = false; mWantRenderNotification = false; doRenderNotification = false; mRenderComplete = true; sGLThreadManager.notifyAll(); Loading Loading @@ -1422,7 +1434,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback sizeChanged = true; w = mWidth; h = mHeight; wantRenderNotification = true; mWantRenderNotification = true; if (LOG_SURFACE) { Log.i("GLThread", "noticing that we want render notification tid=" Loading Loading @@ -1562,7 +1574,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback break; } if (wantRenderNotification) { if (mWantRenderNotification) { doRenderNotification = true; } } Loading Loading @@ -1611,6 +1623,23 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } } public void requestRenderAndWait() { synchronized(sGLThreadManager) { mWantRenderNotification = true; mRequestRender = true; mRenderComplete = false; sGLThreadManager.notifyAll(); while (!mExited && !mPaused && mRenderComplete == false) { try { sGLThreadManager.wait(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } } } public void surfaceCreated() { synchronized(sGLThreadManager) { if (LOG_THREADS) { Loading Loading @@ -1766,6 +1795,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback private int mHeight; private int mRenderMode; private boolean mRequestRender; private boolean mWantRenderNotification; private boolean mRenderComplete; private ArrayList<Runnable> mEventQueue = new ArrayList<Runnable>(); private boolean mSizeChanged = true; Loading