OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519828c
)
libEGL: use SwiftShader if hardware gralloc is not set
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Thu, 14 Sep 2017 10:20:23 +0000
(18:20 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Tue, 12 Dec 2017 16:15:29 +0000
(
00:15
+0800)
opengl/libs/EGL/Loader.cpp
patch
|
blob
|
history
diff --git
a/opengl/libs/EGL/Loader.cpp
b/opengl/libs/EGL/Loader.cpp
index
371239d
..
bed50e3
100644
(file)
--- a/
opengl/libs/EGL/Loader.cpp
+++ b/
opengl/libs/EGL/Loader.cpp
@@
-225,7
+225,13
@@
void* Loader::open(egl_connection_t* cnx)
setEmulatorGlesValue();
- dso = load_driver("GLES", cnx, EGL | GLESv1_CM | GLESv2);
+ // Check if hardware gralloc is set explicitly
+ char prop[PROPERTY_VALUE_MAX];
+ if (property_get("ro.hardware.gralloc", prop, nullptr) && strcmp(prop, "default")) {
+ dso = load_driver("GLES", cnx, EGL | GLESv1_CM | GLESv2);
+ } else {
+ dso = nullptr;
+ }
if (dso) {
hnd = new driver_t(dso);
} else {