GNOME Bugzilla – Bug 649826
unify egl and glx backends as "cogl" backend
Last modified: 2011-06-17 16:58:20 UTC
Since GLX and EGL are abstracted by Cogl the two backends are both implementing everything using the Cogl API and they are almost identical. This updates the egl backend to support everything that the glx backend supports. Now that EGL and GLX are abstracted by Cogl, the plan is that we will squash the clutter-egl/glx backends into one. Since the EGL backend in clutter can conditionally not depend on X11 we will use the EGL backend as the starting point of our common backend.
Created attachment 187523 [details] [review] unify egl and glx backends as "cogl" backend
so, now we're trading a #ifdef mess on two backends with an #ifdef mess on the equivalent of 3 backends. no, I honestly, really really don't like this at all. the code is barely maintainable as it is. we should get rid of the X11 backend in its entirety, and have two backends: the X11 backend, either using EGL or GL through Cogl, and the framebuffer backend, using EGL through Cogl.
The amount of ifdefs relative to the EGL backend hasn't changed. This takes the small amount of code required from the GLX backend to support swap events and moves it into the EGL backend and then simply renames the EGL backend and deletes the GLX backend. This is basically just a renamed EGL backend so any criticism about ifdefing applies to the already existing EGL backend so I don't think that would be a fair reason to block this patch since that's not what this patch changes. Since I have now based my wayland changes on this patch it's going to be quite a pain for me to block that work from landing until we do any other code reorganisation not to mention the difficulty with re-basing that will cause me. While we certainly need to think about how to re-work the Clutter backends this patch is orthogonal; like I said it's basically just a renamed EGL backend + deletes > 1kloc. I'd really like to land this and my wayland updates before we then look at how to re-architect the backends.
the patch landed, so let's close this bug.