Merge "Preserve x18 while preloading SP-HALs in the zygote." am: 23fd045842

am: e03a81cce8

Change-Id: I577e0964abbf758234af6f80dcc69a55ee57d736
This commit is contained in:
Peter Collingbourne
2018-11-15 16:10:08 -08:00
committed by android-build-merger
2 changed files with 39 additions and 1 deletions

View File

@@ -173,12 +173,13 @@ public class ZygoteInit {
}
native private static void nativePreloadAppProcessHALs();
native private static void nativePreloadOpenGL();
private static void preloadOpenGL() {
String driverPackageName = SystemProperties.get(PROPERTY_GFX_DRIVER);
if (!SystemProperties.getBoolean(PROPERTY_DISABLE_OPENGL_PRELOADING, false) &&
(driverPackageName == null || driverPackageName.isEmpty())) {
EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
nativePreloadOpenGL();
}
}