Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5e3638c authored by Romain Guy's avatar Romain Guy
Browse files

Add the ability to disable OpenGL drivers preloading

Bug #8888857

Set ro.zygote.disable_gl_preload to true in the build properties.

Change-Id: Idd93ebb4bbd2861ce60af03ed14819a5cfa70dec
parent 74c69122
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.opengl.EGL14;
import android.os.Debug;
import android.os.Process;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.util.EventLog;
import android.util.Log;
@@ -60,9 +61,10 @@ import java.util.ArrayList;
 * @hide
 */
public class ZygoteInit {

    private static final String TAG = "Zygote";

    private static final String PROPERTY_DISABLE_OPENGL_PRELOADING = "ro.zygote.disable_gl_preload";

    private static final String ANDROID_SOCKET_ENV = "ANDROID_SOCKET_zygote";

    private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
@@ -232,8 +234,10 @@ public class ZygoteInit {
    }

    private static void preloadOpenGL() {
        if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false)) {
            EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
        }
    }

    /**
     * Performs Zygote process initialization. Loads and initializes