OSDN Git Service

Load OpenGL drivers libraries in Zygote
authorRomain Guy <romainguy@google.com>
Thu, 9 May 2013 00:54:20 +0000 (17:54 -0700)
committerRomain Guy <romainguy@google.com>
Thu, 9 May 2013 01:14:37 +0000 (18:14 -0700)
This does not initialize EGL/GL.

Change-Id: I951ae0b7defee86eb06821ea807af3e829f4a73c

core/java/com/android/internal/os/ZygoteInit.java

index fb22df7..1d060f9 100644 (file)
@@ -22,6 +22,7 @@ import static libcore.io.OsConstants.S_IRWXO;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.net.LocalServerSocket;
+import android.opengl.EGL14;
 import android.os.Debug;
 import android.os.Process;
 import android.os.SystemClock;
@@ -227,6 +228,11 @@ public class ZygoteInit {
     static void preload() {
         preloadClasses();
         preloadResources();
+        preloadOpenGL();
+    }
+
+    private static void preloadOpenGL() {
+        EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
     }
 
     /**