Skip to content
Snippets Groups Projects
Commit 78ba7119 authored by Daniel Stone's avatar Daniel Stone
Browse files

simple-egl: Avoid 30bpc configs


[XA]RGB8888 is almost universally the thing people want to use.

Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
parent 8817a5f1
No related branches found
No related tags found
Loading
Pipeline #455917 failed
......@@ -151,7 +151,7 @@ init_egl(struct display *display, struct window *window)
EGL_NONE
};
EGLint major, minor, n, count, i, size;
EGLint major, minor, n, count, i;
EGLConfig *configs;
EGLBoolean ret;
......@@ -179,9 +179,13 @@ init_egl(struct display *display, struct window *window)
assert(ret && n >= 1);
for (i = 0; i < n; i++) {
EGLint buffer_size, red_size;
eglGetConfigAttrib(display->egl.dpy,
configs[i], EGL_BUFFER_SIZE, &size);
if (window->buffer_size == 0 || window->buffer_size == size) {
configs[i], EGL_BUFFER_SIZE, &buffer_size);
eglGetConfigAttrib(display->egl.dpy,
configs[i], EGL_RED_SIZE, &red_size);
if ((window->buffer_size == 0 ||
window->buffer_size == buffer_size) && red_size < 10) {
display->egl.conf = configs[i];
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment