DO NOT MERGE Revert "Stop preloading EGL/GLES in Zygote"
This reverts commit 93f630e1c3.
Change has already been reverted in master, hence DO NOT MERGE.
Bug: 34348911
This commit is contained in:
@@ -79,6 +79,7 @@ import java.util.ArrayList;
|
||||
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 String ANDROID_SOCKET_PREFIX = "ANDROID_SOCKET_";
|
||||
@@ -198,6 +199,9 @@ public class ZygoteInit {
|
||||
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadResources");
|
||||
preloadResources();
|
||||
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL");
|
||||
preloadOpenGL();
|
||||
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||
preloadSharedLibraries();
|
||||
preloadTextResources();
|
||||
// Ask the WebViewFactory to do any initialization that must run in the zygote process,
|
||||
@@ -238,6 +242,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