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:
3bb376a
)
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>
Thu, 14 Nov 2019 04:49:34 +0000
(12:49 +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
c65bddf
..
f9ce304
100644
(file)
--- a/
opengl/libs/EGL/eglApi.cpp
+++ b/
opengl/libs/EGL/eglApi.cpp
@@
-657,6
+657,9
@@
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 if (cnx->egl.eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &colorDepth)) {
+ ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x", eglGetError());
+ *format = android_pixel_format(colorDepth);
} else {
*format = HAL_PIXEL_FORMAT_RGBA_8888;
}