Merge "Revert "Stop preloading EGL/GLES in Zygote""
This commit is contained in:
committed by
Android (Google) Code Review
commit
5bee12bda6
@@ -80,6 +80,7 @@ import java.security.Provider;
|
||||
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 PROPERTY_RUNNING_IN_CONTAINER = "ro.boot.container";
|
||||
|
||||
private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
|
||||
@@ -124,6 +125,9 @@ public class ZygoteInit {
|
||||
bootTimingsTraceLog.traceBegin("PreloadResources");
|
||||
preloadResources();
|
||||
bootTimingsTraceLog.traceEnd(); // PreloadResources
|
||||
bootTimingsTraceLog.traceBegin("PreloadOpenGL");
|
||||
preloadOpenGL();
|
||||
bootTimingsTraceLog.traceEnd(); // PreloadOpenGL
|
||||
preloadSharedLibraries();
|
||||
preloadTextResources();
|
||||
// Ask the WebViewFactory to do any initialization that must run in the zygote process,
|
||||
@@ -173,6 +177,12 @@ public class ZygoteInit {
|
||||
System.loadLibrary("jnigraphics");
|
||||
}
|
||||
|
||||
private static void preloadOpenGL() {
|
||||
if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false)) {
|
||||
EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
|
||||
}
|
||||
}
|
||||
|
||||
private static void preloadTextResources() {
|
||||
Hyphenator.init();
|
||||
TextView.preloadFontCache();
|
||||
|
||||
Reference in New Issue
Block a user