am 24d237db: add a debug property to disable h/w composition. debug.sf.hw, when set to 0 will disable h/w composition
Merge commit '24d237db943051942b5966f5e788d67050ec0ba5' into eclair-plus-aosp * commit '24d237db943051942b5966f5e788d67050ec0ba5': add a debug property to disable h/w composition. debug.sf.hw, when set to 0 will disable h/w composition
This commit is contained in:
@@ -103,10 +103,22 @@ void DisplayHardware::init(uint32_t dpy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initialize EGL
|
// initialize EGL
|
||||||
const EGLint attribs[] = {
|
EGLint attribs[] = {
|
||||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
|
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
|
||||||
|
EGL_NONE, 0,
|
||||||
EGL_NONE
|
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 w, h, dummy;
|
||||||
EGLint numConfigs=0;
|
EGLint numConfigs=0;
|
||||||
EGLSurface surface;
|
EGLSurface surface;
|
||||||
@@ -193,7 +205,6 @@ void DisplayHardware::init(uint32_t dpy)
|
|||||||
mDpiY = mNativeWindow->ydpi;
|
mDpiY = mNativeWindow->ydpi;
|
||||||
mRefreshRate = fbDev->fps;
|
mRefreshRate = fbDev->fps;
|
||||||
|
|
||||||
char property[PROPERTY_VALUE_MAX];
|
|
||||||
/* Read density from build-specific ro.sf.lcd_density property
|
/* Read density from build-specific ro.sf.lcd_density property
|
||||||
* except if it is overridden by qemu.sf.lcd_density.
|
* except if it is overridden by qemu.sf.lcd_density.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user