mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
25 lines
501 B
Java
25 lines
501 B
Java
package org.thoughtcrime.securesms;
|
|
|
|
import android.os.Build;
|
|
import androidx.annotation.RequiresApi;
|
|
import org.webrtc.EglBase;
|
|
|
|
@RequiresApi(Build.VERSION_CODES.M)
|
|
public class EglUtils {
|
|
private static EglBase eglBase;
|
|
|
|
public static synchronized EglBase getEglBase() {
|
|
if (eglBase == null) {
|
|
eglBase = EglBase.create();
|
|
}
|
|
return eglBase;
|
|
}
|
|
|
|
public static synchronized void release() {
|
|
if (eglBase != null) {
|
|
eglBase.release();
|
|
eglBase = null;
|
|
}
|
|
}
|
|
}
|