summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-09-04 18:49:03 -0700
committerMathias Agopian <mathias@google.com>2009-09-09 19:20:10 -0700
commit24d237db943051942b5966f5e788d67050ec0ba5 (patch)
tree2a11231583c10a41798544bc14944ee38a9fbc2b /libs/surfaceflinger
parentbbe14a1758a5b99689b7aa13a6d4f58e61705ebf (diff)
downloadframeworks_base-24d237db943051942b5966f5e788d67050ec0ba5.zip
frameworks_base-24d237db943051942b5966f5e788d67050ec0ba5.tar.gz
frameworks_base-24d237db943051942b5966f5e788d67050ec0ba5.tar.bz2
add a debug property to disable h/w composition. debug.sf.hw, when set to 0 will disable h/w composition
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 651e7cf..d893f0a 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -103,10 +103,22 @@ void DisplayHardware::init(uint32_t dpy)
}
// initialize EGL
- const EGLint attribs[] = {
+ EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_NONE, 0,
EGL_NONE
};
+
+ // debug: disable h/w rendering
+ char property[PROPERTY_VALUE_MAX];
+ if (property_get("debug.sf.hw", property, NULL) > 0) {
+ if (atoi(property) == 0) {
+ LOGW("H/W composition disabled");
+ attribs[2] = EGL_CONFIG_CAVEAT;
+ attribs[3] = EGL_SLOW_CONFIG;
+ }
+ }
+
EGLint w, h, dummy;
EGLint numConfigs=0;
EGLSurface surface;
@@ -193,7 +205,6 @@ void DisplayHardware::init(uint32_t dpy)
mDpiY = mNativeWindow->ydpi;
mRefreshRate = fbDev->fps;
- char property[PROPERTY_VALUE_MAX];
/* Read density from build-specific ro.sf.lcd_density property
* except if it is overridden by qemu.sf.lcd_density.
*/