diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-10-28 20:12:01 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-10-28 20:12:01 +0100 |
commit | a5ed31ba3bdfb8cd761e87f3de86198c6233c3cc (patch) | |
tree | e2f014f9f005d31095cc8844f60963b47b26ff0b /core/java/android/app/ActivityManager.java | |
parent | be09772e71a516759b5ce7fb9d2bab0d7227f291 (diff) | |
download | frameworks_base-a5ed31ba3bdfb8cd761e87f3de86198c6233c3cc.zip frameworks_base-a5ed31ba3bdfb8cd761e87f3de86198c6233c3cc.tar.gz frameworks_base-a5ed31ba3bdfb8cd761e87f3de86198c6233c3cc.tar.bz2 |
Adapt hardware renderer and screen rotation animation for SoftwareGL
Change-Id: I0d7809e7ae408c4762982599576be9a78d54a2dc
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'core/java/android/app/ActivityManager.java')
-rw-r--r-- | core/java/android/app/ActivityManager.java | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index e4e0d8e..e5c0e87 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -381,25 +381,29 @@ public class ActivityManager { * @hide */ static public boolean isHighEndGfx() { - MemInfoReader reader = new MemInfoReader(); - reader.readMemInfo(); - if (reader.getTotalSize() >= (512*1024*1024)) { - // If the device has at least 512MB RAM available to the kernel, - // we can afford the overhead of graphics acceleration. - return true; - } + if (SystemProperties.get("ro.softwaregl").equals("true")) { + return false; + } else { + MemInfoReader reader = new MemInfoReader(); + reader.readMemInfo(); + if (reader.getTotalSize() >= (512*1024*1024)) { + // If the device has at least 512MB RAM available to the kernel, + // we can afford the overhead of graphics acceleration. + return true; + } - Display display = DisplayManagerGlobal.getInstance().getRealDisplay( - Display.DEFAULT_DISPLAY); - Point p = new Point(); - display.getRealSize(p); - int pixels = p.x * p.y; - if (pixels >= (1024*600)) { - // If this is a sufficiently large screen, then there are enough - // pixels on it that we'd really like to use hw drawing. - return true; + Display display = DisplayManagerGlobal.getInstance().getRealDisplay( + Display.DEFAULT_DISPLAY); + Point p = new Point(); + display.getRealSize(p); + int pixels = p.x * p.y; + if (pixels >= (1024*600)) { + // If this is a sufficiently large screen, then there are enough + // pixels on it that we'd really like to use hw drawing. + return true; + } + return false; } - return false; } /** |