Delete glPrograms in Contrast and RgbMatrix.
Remove unecessary null checks. PiperOrigin-RevId: 469999952
This commit is contained in:
parent
0f48c89f1f
commit
f454c9aa74
@ -129,7 +129,7 @@ import java.util.Locale;
|
|||||||
@Override
|
@Override
|
||||||
public void drawFrame(int inputTexId, long presentationTimeUs) throws FrameProcessingException {
|
public void drawFrame(int inputTexId, long presentationTimeUs) throws FrameProcessingException {
|
||||||
try {
|
try {
|
||||||
checkStateNotNull(glProgram).use();
|
glProgram.use();
|
||||||
|
|
||||||
// Draw to the canvas and store it in a texture.
|
// Draw to the canvas and store it in a texture.
|
||||||
String text =
|
String text =
|
||||||
@ -159,14 +159,12 @@ import java.util.Locale;
|
|||||||
@Override
|
@Override
|
||||||
public void release() throws FrameProcessingException {
|
public void release() throws FrameProcessingException {
|
||||||
super.release();
|
super.release();
|
||||||
if (glProgram != null) {
|
|
||||||
try {
|
try {
|
||||||
glProgram.delete();
|
glProgram.delete();
|
||||||
} catch (GlUtil.GlException e) {
|
} catch (GlUtil.GlException e) {
|
||||||
throw new FrameProcessingException(e);
|
throw new FrameProcessingException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static Bitmap flipBitmapVertically(Bitmap bitmap) {
|
private static Bitmap flipBitmapVertically(Bitmap bitmap) {
|
||||||
Matrix flip = new Matrix();
|
Matrix flip = new Matrix();
|
||||||
|
@ -114,7 +114,6 @@ import java.io.IOException;
|
|||||||
@Override
|
@Override
|
||||||
public void release() throws FrameProcessingException {
|
public void release() throws FrameProcessingException {
|
||||||
super.release();
|
super.release();
|
||||||
if (glProgram != null) {
|
|
||||||
try {
|
try {
|
||||||
glProgram.delete();
|
glProgram.delete();
|
||||||
} catch (GlUtil.GlException e) {
|
} catch (GlUtil.GlException e) {
|
||||||
@ -122,4 +121,3 @@ import java.io.IOException;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -75,4 +75,14 @@ import java.io.IOException;
|
|||||||
throw new FrameProcessingException(e, presentationTimeUs);
|
throw new FrameProcessingException(e, presentationTimeUs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() throws FrameProcessingException {
|
||||||
|
super.release();
|
||||||
|
try {
|
||||||
|
glProgram.delete();
|
||||||
|
} catch (GlUtil.GlException e) {
|
||||||
|
throw new FrameProcessingException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,14 +321,12 @@ import java.util.Arrays;
|
|||||||
@Override
|
@Override
|
||||||
public void release() throws FrameProcessingException {
|
public void release() throws FrameProcessingException {
|
||||||
super.release();
|
super.release();
|
||||||
if (glProgram != null) {
|
|
||||||
try {
|
try {
|
||||||
glProgram.delete();
|
glProgram.delete();
|
||||||
} catch (GlUtil.GlException e) {
|
} catch (GlUtil.GlException e) {
|
||||||
throw new FrameProcessingException(e);
|
throw new FrameProcessingException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates {@link #compositeTransformationMatrix} and {@link #visiblePolygon} based on the given
|
* Updates {@link #compositeTransformationMatrix} and {@link #visiblePolygon} based on the given
|
||||||
|
@ -135,4 +135,14 @@ import java.io.IOException;
|
|||||||
throw new FrameProcessingException(e, presentationTimeUs);
|
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…
x
Reference in New Issue
Block a user