Android SurfaceViewRenderer: Only clear image in release() if initialized
This CL is a small bug fix for "Android SurfaceViewRenderer: Allow to re-init after release() has been called" https://codereview.webrtc.org/1389203003/. It is only possible to clear the last image in release() if init() has been called beforehand. TBR=hbos BUG=webrtc:4742 Review URL: https://codereview.webrtc.org/1396573003 . Cr-Commit-Position: refs/heads/master@{#10223}
This commit is contained in:
parent
4e572470a3
commit
bf2004bc37
@ -206,9 +206,11 @@ public class SurfaceViewRenderer extends SurfaceView
|
||||
GLES20.glDeleteTextures(3, yuvTextures, 0);
|
||||
yuvTextures = null;
|
||||
}
|
||||
// Clear last rendered image to black.
|
||||
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
|
||||
eglBase.swapBuffers();
|
||||
if (eglBase.hasSurface()) {
|
||||
// Clear last rendered image to black.
|
||||
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
|
||||
eglBase.swapBuffers();
|
||||
}
|
||||
eglBase.release();
|
||||
eglBase = null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user