Release BitmapTextureManager resources
PiperOrigin-RevId: 525434071
This commit is contained in:
parent
ec45c0d441
commit
9406410c48
@ -101,6 +101,20 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases all resources.
|
||||
*
|
||||
* @see VideoFrameProcessor#release()
|
||||
*/
|
||||
public void release() {
|
||||
videoFrameProcessingTaskExecutor.submit(
|
||||
() -> {
|
||||
if (currentGlTextureInfo != null) {
|
||||
GlUtil.deleteTexture(currentGlTextureInfo.texId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Methods that must be called on the GL thread.
|
||||
|
||||
private void setupBitmap(Bitmap bitmap, long durationUs, float frameRate, boolean useHdr)
|
||||
|
@ -410,6 +410,9 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
|
||||
if (inputExternalTextureManager != null) {
|
||||
inputExternalTextureManager.release();
|
||||
}
|
||||
if (inputBitmapTextureManager != null) {
|
||||
inputBitmapTextureManager.release();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user