gdkglcontext.c: Ensure EGL contexts are in-sync with shared context
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 17 Jan 2022 09:27:10 +0000 (17:27 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 19 Jan 2022 03:56:32 +0000 (11:56 +0800)
commitb85aa10700a3af7aa4e7c7c0cc5a9c02fb36ca35
tree3379edd22b1630732cc46fd4dad688a0cc7094fe
parent598c7d9cf4f1771cf0888d0b275652115c2cc806
gdkglcontext.c: Ensure EGL contexts are in-sync with shared context

The EGL context that we are actually creating must have matching OpenGL/ES
versions and allowed GL API set with the previously-created EGL context
that will be shared with it so that they can interoperate together, if
applicable.

This will fix the situation by making sure that we request for the
OpenGL/ES version and OpenGL API set that match with what we have in our shared
EGL context.  Otherwise, the newly-created EGL context assumed a OpenGL/ES 2.0
context that supported desktop OpenGL, which may not be what we wanted, such as
in the case of libANGLE.
gdk/gdkglcontext.c