Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-native: コミット

frameworks/native


コミットメタ情報

リビジョン4240cd47ecbf7140c1b8fa062dac1480d0d9f083 (tree)
日時2017-09-14 19:20:23
作者Chih-Wei Huang <cwhuang@linu...>
コミッターChih-Wei Huang

ログメッセージ

libEGL: use SwiftShader if hardware gralloc is not set

The old implementation to disable hardware acceleration is reverted.

変更サマリ

差分

--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -92,13 +92,6 @@ checkGlesEmulationStatus(void)
9292 char prop[PROPERTY_VALUE_MAX];
9393 int result = -1;
9494
95- /* Check if hardware acceleration disabled explicitly */
96- property_get("debug.egl.hw", prop, "1");
97- if (!atoi(prop)) {
98- ALOGD("3D hardware acceleration is disabled");
99- return 0;
100- }
101-
10295 /* First, check for qemu=1 */
10396 property_get("ro.kernel.qemu",prop,"0");
10497 if (atoi(prop) != 1)
@@ -249,7 +242,13 @@ void* Loader::open(egl_connection_t* cnx)
249242
250243 setEmulatorGlesValue();
251244
252- dso = load_driver("GLES", cnx, EGL | GLESv1_CM | GLESv2);
245+ // Check if hardware gralloc is set explicitly
246+ char prop[PROPERTY_VALUE_MAX];
247+ if (property_get("ro.hardware.gralloc", prop, nullptr) && strcmp(prop, "default")) {
248+ dso = load_driver("GLES", cnx, EGL | GLESv1_CM | GLESv2);
249+ } else {
250+ dso = nullptr;
251+ }
253252 if (dso) {
254253 hnd = new driver_t(dso);
255254 } else {
旧リポジトリブラウザで表示