Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b4a9167 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Linux Build Service Account
Browse files

frameworks: egl: Enable loading of SW gles libs

Based on the property persist.sys.force_sw_gles, ensure that the
S/W OpenGL library is loaded.

CRs-Fixed: 1021870
Change-Id: If37bfa979d021d28586e3bf9c1f9c5ce77d3c3a8
parent eb7980c2
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -86,7 +86,12 @@ checkGlesEmulationStatus(void)
    char  prop[PROPERTY_VALUE_MAX];
    int   result = -1;

    /* First, check for qemu=1 */
    /* First check if forced from HW */
    property_get("persist.sys.force_sw_gles", prop, "0");
    if (atoi(prop) == 1)
        return 0;

    /* Check for qemu=1 */
    property_get("ro.kernel.qemu",prop,"0");
    if (atoi(prop) != 1)
        return -1;
@@ -176,6 +181,14 @@ static void* load_wrapper(const char* path) {

static void setEmulatorGlesValue(void) {
    char prop[PROPERTY_VALUE_MAX];

    property_get("persist.sys.force_sw_gles", prop, "0");
    if (atoi(prop) == 1) {
        ALOGD("setEmulatorGlesValue: Force S/W GLES");
        property_set("qemu.gles", "0");
        return;
    }

    property_get("ro.kernel.qemu", prop, "0");
    if (atoi(prop) != 1) return;