Feature #792
openTry adding opengl to cairo in Launcher
10%
Description
This is an experiment to see if we can speed up the UI.
Some references:- https://www.cairographics.org/OpenGL/
- https://bazaar.launchpad.net/~macslow/gl-cairo-simple/trunk/files
- http://ssvb.github.io/2012/05/04/xorg-drivers-and-software-rendering.html
- https://github.com/cubicool/cairo-gl-sdl2 - uses cairo opengl backend (but it's C++)
- https://cgit.freedesktop.org/cairo/ - cairo source - look in src/ for gl backend support
- https://cairo.cairographics.narkive.com/acXWIWzV/does-cairo-use-hardware-acceleration - old but good discussion on using GL with Cairo.
- Buildroot needs Mesa added with vc4 support to get Cairo with GL.
- Update to VC library to allow X11 EGL on RPi
Might want to bump to latest release (1.17.2) from Buildroot's 2020.02.4 LTS current (1.16.0)
Updated by Hammel about 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Some research on how to use this tonight.
- The EGL backend for Cairo gets enabled in Buildroot if libgles is enabled.
- libgles is part of the VC package installed to /opt/vc/, specifically in /opt/vc/lib.
- /opt/vc/lib is included in /etc/ld.so.conf.d/vc.conf.
So by enabling libgles this should just work. There is a Gallium vc4 entry for Raspberry Pi under Mesa3D (Target Packages->Graphics libs/apps->Mesa3d) but this doesn't set the required Buildroot variable. However, enabling rpi-userland (Target Packages->Hardware Handling->rpi-userland) will do the trick.
That package downloads the same things I pull from the userland, but it uses a specific git hash. I'll need to patch the package with the latest updates to get as close to the latest version I've been using.
I'll have to work out what gets installed and how to merge it with what I do now. One thing I can do is change the rpi-userland.mk to set the install prefix to be /opt/vc, which would map what I do, then I can copy in my stuff as usual.