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

Commit 000fab84 authored by Bo Hu's avatar Bo Hu Committed by Android (Google) Code Review
Browse files

Merge "View Renderer: remove emulator hack"

parents 6ffb81d8 677595fd
Loading
Loading
Loading
Loading
+1 −19
Original line number Original line Diff line number Diff line
@@ -230,7 +230,6 @@ public final class ThreadedRenderer extends HardwareRenderer {
        sTrimForeground = true;
        sTrimForeground = true;
    }
    }


    private static Boolean sSupportsOpenGL;


    /**
    /**
     * Indicates whether threaded rendering is available under any form for
     * Indicates whether threaded rendering is available under any form for
@@ -240,25 +239,8 @@ public final class ThreadedRenderer extends HardwareRenderer {
     *         false otherwise
     *         false otherwise
     */
     */
    public static boolean isAvailable() {
    public static boolean isAvailable() {
        if (sSupportsOpenGL != null) {
            return sSupportsOpenGL.booleanValue();
        }
        if (SystemProperties.getInt("ro.kernel.qemu", 0) == 0) {
            // Device is not an emulator.
            sSupportsOpenGL = true;
        return true;
        return true;
    }
    }
        int qemu_gles = SystemProperties.getInt("qemu.gles", -1);
        if (qemu_gles == -1) {
            // In this case, the value of the qemu.gles property is not ready
            // because the SurfaceFlinger service may not start at this point.
            return false;
        }
        // In the emulator this property will be set > 0 when OpenGL ES 2.0 is
        // enabled, 0 otherwise. On old emulator versions it will be undefined.
        sSupportsOpenGL = qemu_gles > 0;
        return sSupportsOpenGL.booleanValue();
    }


    /**
    /**
     * Creates a threaded renderer using OpenGL.
     * Creates a threaded renderer using OpenGL.