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:
792c8dc
)
libEGL: select pixel format by EGL_NATIVE_VISUAL_ID
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Mon, 4 Sep 2017 11:26:33 +0000
(19:26 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Tue, 12 Dec 2017 16:15:20 +0000
(
00:15
+0800)
We need this workaround until Mesa supports HAL_PIXEL_FORMAT_RGBA_8888.
opengl/libs/EGL/eglApi.cpp
patch
|
blob
|
history
diff --git
a/opengl/libs/EGL/eglApi.cpp
b/opengl/libs/EGL/eglApi.cpp
index
94dfe6a
..
01eeb64
100644
(file)
--- a/
opengl/libs/EGL/eglApi.cpp
+++ b/
opengl/libs/EGL/eglApi.cpp
@@
-655,7
+655,8
@@
void getNativePixelFormat(EGLDisplay dpy, egl_connection_t* cnx, EGLConfig confi
if (componentType == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT) {
if (colorDepth > 24) {
format = HAL_PIXEL_FORMAT_RGBA_1010102;
- } else {
+ } else if (!cnx->egl.eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &format)) {
+ ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x", eglGetError());
format = HAL_PIXEL_FORMAT_RGBA_8888;
}
} else {