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

Commit a252caad authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "frameworks/base: Add an option to disable hw acceleration via system prop." into ics

parents cdeb0cac b142c81d
Loading
Loading
Loading
Loading
+23 −16
Original line number Diff line number Diff line
@@ -212,10 +212,16 @@ public class ActivityManager {
    /**
     * Used by persistent processes to determine if they are running on a
     * higher-end device so should be okay using hardware drawing acceleration
     * (which tends to consume a lot more RAM).
     * (which tends to consume a lot more RAM). Alternatively, setting
     * ro.config.disable_hw_accel=true disables hardware acceleration even if the
     * device meets the other criteria since not all devices currently have
     * the ability to support it.
     * @hide
     */
    static public boolean isHighEndGfx(Display display) {
        if (SystemProperties.get("ro.config.disable_hw_accel").equals("true")) {
            return false;
        } else {
            MemInfoReader reader = new MemInfoReader();
            reader.readMemInfo();
            if (reader.getTotalSize() >= (512*1024*1024)) {
@@ -233,6 +239,7 @@ public class ActivityManager {
            }
            return false;
        }
    }

    /**
     * Use to decide whether the running device can be considered a "large