mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Delete glPrograms in Contrast and RgbMatrix.
Remove unecessary null checks. PiperOrigin-RevId: 469999952
This commit is contained in:
parent
2a05a50403
commit
a7d3752c66
5 changed files with 33 additions and 19 deletions
|
|
@ -129,7 +129,7 @@ import java.util.Locale;
|
|||
@Override
|
||||
public void drawFrame(int inputTexId, long presentationTimeUs) throws FrameProcessingException {
|
||||
try {
|
||||
checkStateNotNull(glProgram).use();
|
||||
glProgram.use();
|
||||
|
||||
// Draw to the canvas and store it in a texture.
|
||||
String text =
|
||||
|
|
@ -159,12 +159,10 @@ import java.util.Locale;
|
|||
@Override
|
||||
public void release() throws FrameProcessingException {
|
||||
super.release();
|
||||
if (glProgram != null) {
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,12 +114,10 @@ import java.io.IOException;
|
|||
@Override
|
||||
public void release() throws FrameProcessingException {
|
||||
super.release();
|
||||
if (glProgram != null) {
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,4 +75,14 @@ import java.io.IOException;
|
|||
throw new FrameProcessingException(e, presentationTimeUs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() throws FrameProcessingException {
|
||||
super.release();
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,12 +323,10 @@ import java.util.Arrays;
|
|||
@Override
|
||||
public void release() throws FrameProcessingException {
|
||||
super.release();
|
||||
if (glProgram != null) {
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,4 +135,14 @@ import java.io.IOException;
|
|||
throw new FrameProcessingException(e, presentationTimeUs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() throws FrameProcessingException {
|
||||
super.release();
|
||||
try {
|
||||
glProgram.delete();
|
||||
} catch (GlUtil.GlException e) {
|
||||
throw new FrameProcessingException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue