summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2013-11-06 10:30:48 +0530
committerUbuntu <vishal.bhoj@linaro.org>2014-06-05 09:54:02 +0000
commit1eab94ce65e1a8a05d07ff9e822fd322155e67f3 (patch)
tree6b3b649d79cbb315123e1dd6c6b30e20e36a4940
parent54b8bf20888a254858d965029a978431549a3ae2 (diff)
downloadnative-linaro_android_4.4.3.tar.gz
libEGL: use s/w rendering on h/w with no GPUlinaro_android_4.4.4linaro_android_4.4.3
Fallback to Software Renderer used for emulators if we are running on a hardware with no GPU support. Change-Id: Id0772f466b5a08f90e7f9eceeb9b8f5f69179539 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--opengl/libs/EGL/Loader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 02914a06ea..89c9107888 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -86,6 +86,11 @@ checkGlesEmulationStatus(void)
char prop[PROPERTY_VALUE_MAX];
int result = -1;
+ /* Running on a hardware with no GPU? */
+ property_get("ro.nohardwaregfx",prop,"false");
+ if (!strcmp(prop,"true"))
+ return 0;
+
/* First, check for qemu=1 */
property_get("ro.kernel.qemu",prop,"0");
if (atoi(prop) != 1)
@@ -308,7 +313,7 @@ void *Loader::load_driver(const char* kind,
// in the emulator case, we just return the hardcoded name
// of the software renderer.
if (checkGlesEmulationStatus() == 0) {
- ALOGD("Emulator without GPU support detected. "
+ ALOGD("No GPU support detected. "
"Fallback to software renderer.");
result.setTo("/system/lib/egl/libGLES_android.so");
return true;