Compiled with ENABLE_OPENGL=ON ENABLE_GLES2=ON, Webkit attempts to use GL and fails due to absesence of libGL.so. I broke on gdk_gl_context_set_use_es where a GdkGLContext is created with NO GLES2 and the backtrace reads as attached
Created attachment 291943 [details] Backtrace
According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not automatially detect the availability or preference.
Can you check the output of: 1. ldd /path/to/libwebkit2gtk-4.0.so.37 2. ldd /path/to/WebKitWebProcess Does any of them link with libGL or give any error related to libraries not found?
(In reply to comment #2) > According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not > automatially detect the availability or preference. If environment variables are the only way, you'll have to set them before starting WebKit. We're not going to mess with that.
(In reply to comment #2) > According to a GTK+ dev, Webkit is supposed to request GLES - Gdk does not > automatially detect the availability or preference. That's not really possible I'm afraid. gdk_cairo_draw_from_gl() uses the paint gl context of the given window that is always created with a NULL sharing context and realized right after being created. On realize is when using ES is decided, and the only way to change that for the paint gl context is using the debug flags. I don't think using debug flags for this is the right way. I think there should be a way to tell GDK to use ES globally, maybe in GdkWindow to use that when creating the paint context. Or maybe there's actually a way that is not the debug flags, but I haven't found it reading the code.
What I would do as a workaround for now is to fallback to glReadPixels when USE(OPENGL_ES_2) is enabled.