mirror of
https://github.com/androidx/media.git
synced 2025-05-05 06:30:24 +08: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
3570232cf0
commit
1776e6e5b0
@ -111,6 +111,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…
x
Reference in New Issue
Block a user