xbmc/xbmc — pull request #1493 by theuni (2012-09-28 05:44:19+00:00)
Title: Egl rewrite

Depends on split-res #1467

As promised with f6ecaea0, here is a complete rewrite of our EGL usage.
At the moment this affects only android/amlogic/rpi.

Our previous system of inheritance was wonky, and was one hack after another.
This provides a single coherent implementation of the window life-cycle. It
also begins the process of decoupling rendering from windowing (at least for
EGL)

Each client is expected to fill in its windowing functionality outside of egl.

In theory, adding a new back-end requires only describing how to create/destroy
native structures and enumerate resolutions. If more functionality is needed, it
should be added to the EGLNativeType interface rather than hacking up the EGL
implementation itself.

Also, the back-ends are detected and tested at runtime rather than build-
time, meaning that it is not necessary to specify a back-end. It also
means that a single binary would be capable of running on multiple EGL
back-ends (for example, fbdev and X) when they're added.

Each back-end is required to provide a test-function at runtime to
determine whether it should be considered for use.

TODO: some introspect for enumerating possible back-ends before window-creation
TODO: fall-back if the first back-end fails
TODO: add rpi back-end
TODO: fixup split-res once it (and this) hits master
TODO: add doxy

I'd like to get this in during the October merge because it's a big one to carry. The only serious regression currently is broken rpi. I think Edgar should be able to tell pretty quickly if it's going to take any serious effort to get it hooked up there.

ping @gbeauchesne . I was waiting to get this in before looking into merging your stuff. Mind having a look and see if you think it'd be reasonably easy to implement for your kms/wayland stuff? I think it should get rid of the majority of the hacking that had to be done on configure.in.

ping @gimli . Please hit me with any questions. I'll do my best to get to the doxy tomorrrow.