am c1d796f4: am ef6c1c57: Merge changes Ie449043b,I0c08e8cd

* commit 'c1d796f44ae74a629f4d6d5d487bdf028d3d2eb2':
  GPU: Build gralloc.ranchu.so
  init.ranchu.rc: enable qemu-props & use GPU emulation if available
diff --git a/init.ranchu.rc b/init.ranchu.rc
index bad365d..27cf95e 100644
--- a/init.ranchu.rc
+++ b/init.ranchu.rc
@@ -30,14 +30,6 @@
     setprop status.battery.level_raw  50
     setprop status.battery.level_scale 9
 
-# Disable GPU support
-    setprop ro.kernel.qemu 1
-    setprop ro.kernel.qemu.gles 0
-    symlink /system/lib64/hw/gralloc.default.aosp.so /system/lib64/hw/gralloc.default.so
-
-# disable RenderScript
-    setprop config.disable_renderscript 1
-
 # disable some daemons the emulator doesn't want
     stop dund
     stop akmd
@@ -62,6 +54,18 @@
     group root
     oneshot
 
+# The qemu-props program is used to set various system
+# properties on boot. It must be run early during the boot
+# process to avoid race conditions with other daemons that
+# might read them (e.g. surface flinger), so define it in
+# class 'core'
+#
+service qemu-props /system/bin/qemu-props
+    class core
+    user root
+    group root
+    oneshot
+
 # -Q is a special logcat option that forces the
 # program to check wether it runs on the emulator
 # if it does, it redirects its output to the device
diff --git a/opengl/system/gralloc/Android.mk b/opengl/system/gralloc/Android.mk
index 71ac2f2..b93164a 100644
--- a/opengl/system/gralloc/Android.mk
+++ b/opengl/system/gralloc/Android.mk
@@ -17,4 +17,19 @@
 
 $(call emugl-end-module)
 
+$(call emugl-begin-shared-library,gralloc.ranchu)
+$(call emugl-import,libGLESv1_enc lib_renderControl_enc libOpenglSystemCommon)
+$(call emugl-set-shared-library-subpath,hw)
+
+LOCAL_CFLAGS += -DLOG_TAG=\"gralloc_ranchu\"
+LOCAL_CFLAGS += -Wno-missing-field-initializers
+
+LOCAL_SRC_FILES := gralloc.cpp
+
+# Need to access the special OPENGL TLS Slot
+LOCAL_C_INCLUDES += bionic/libc/private
+LOCAL_SHARED_LIBRARIES += libdl
+
+$(call emugl-end-module)
+
 endif # BUILD_EMULATOR_OPENGL_DRIVER != false