DO NOT MERGE Revert "Stop preloading EGL/GLES in Zygote"
am: e8ce1276e2
Change-Id: Ib5f68ce3a05cdb6e6f1bba5f6a17d0848e9a27ab
This commit is contained in:
@@ -78,6 +78,7 @@ import java.security.Provider;
|
|||||||
public class ZygoteInit {
|
public class ZygoteInit {
|
||||||
private static final String TAG = "Zygote";
|
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 PROPERTY_RUNNING_IN_CONTAINER = "ro.boot.container";
|
||||||
|
|
||||||
private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
|
private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
|
||||||
@@ -120,6 +121,9 @@ public class ZygoteInit {
|
|||||||
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadResources");
|
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadResources");
|
||||||
preloadResources();
|
preloadResources();
|
||||||
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||||
|
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "PreloadOpenGL");
|
||||||
|
preloadOpenGL();
|
||||||
|
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||||
preloadSharedLibraries();
|
preloadSharedLibraries();
|
||||||
preloadTextResources();
|
preloadTextResources();
|
||||||
// Ask the WebViewFactory to do any initialization that must run in the zygote process,
|
// Ask the WebViewFactory to do any initialization that must run in the zygote process,
|
||||||
@@ -160,6 +164,12 @@ public class ZygoteInit {
|
|||||||
System.loadLibrary("jnigraphics");
|
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() {
|
private static void preloadTextResources() {
|
||||||
Hyphenator.init();
|
Hyphenator.init();
|
||||||
TextView.preloadFontCache();
|
TextView.preloadFontCache();
|
||||||
|
|||||||
Reference in New Issue
Block a user