summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/ImageWallpaper.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 5a6f3c9..b4634ab 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -60,6 +60,7 @@ public class ImageWallpaper extends WallpaperService {
private static final String GL_LOG_TAG = "ImageWallpaperGL";
private static final boolean DEBUG = false;
private static final String PROPERTY_KERNEL_QEMU = "ro.kernel.qemu";
+ private static final String PROPERTY_RENDERING_SOFTWARE = "ro.softwaregl";
static final boolean FIXED_SIZED_SURFACE = true;
static final boolean USE_OPENGL = true;
@@ -77,7 +78,7 @@ public class ImageWallpaper extends WallpaperService {
//noinspection PointlessBooleanExpression,ConstantConditions
if (FIXED_SIZED_SURFACE && USE_OPENGL) {
- if (!isEmulator()) {
+ if (!isEmulator() && !needsSoftwareRendering()) {
mIsHwAccelerated = ActivityManager.isHighEndGfx();
}
}
@@ -94,6 +95,10 @@ public class ImageWallpaper extends WallpaperService {
return "1".equals(SystemProperties.get(PROPERTY_KERNEL_QEMU, "0"));
}
+ private static boolean needsSoftwareRendering() {
+ return "1".equals(SystemProperties.get(PROPERTY_RENDERING_SOFTWARE, "0"));
+ }
+
@Override
public Engine onCreateEngine() {
mEngine = new DrawableEngine();
@@ -701,7 +706,7 @@ public class ImageWallpaper extends WallpaperService {
mEglConfig = chooseEglConfig();
if (mEglConfig == null) {
- throw new RuntimeException("eglConfig not initialized");
+ return false;
}
mEglContext = createContext(mEgl, mEglDisplay, mEglConfig);