mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Make no context current when releasing DummySurface
This avoids a small native leak. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200955086
This commit is contained in:
parent
e4f9ff5d91
commit
6c733702de
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,10 @@ public final class EGLSurfaceTexture implements SurfaceTexture.OnFrameAvailableL
|
|||
GLES20.glDeleteTextures(1, textureIdHolder, 0);
|
||||
}
|
||||
} finally {
|
||||
if (display != null && !display.equals(EGL14.EGL_NO_DISPLAY)) {
|
||||
EGL14.eglMakeCurrent(
|
||||
display, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);
|
||||
}
|
||||
if (surface != null && !surface.equals(EGL14.EGL_NO_SURFACE)) {
|
||||
EGL14.eglDestroySurface(display, surface);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue