Project

General

Profile

Actions

Feature #792

open

Try adding opengl to cairo in Launcher

Added by Hammel almost 3 years ago. Updated 7 days ago.

Status:
In Progress
Priority:
Urgent
Assignee:
Category:
General
Target version:
Start date:
14 Aug 2020
Due date:
% Done:

10%

Estimated time:
Severity:
01 - Critical

Description

This is an experiment to see if we can speed up the UI.

Some references:
  1. https://www.cairographics.org/OpenGL/
  2. https://bazaar.launchpad.net/~macslow/gl-cairo-simple/trunk/files
  3. http://ssvb.github.io/2012/05/04/xorg-drivers-and-software-rendering.html
  4. https://github.com/cubicool/cairo-gl-sdl2 - uses cairo opengl backend (but it's C++)
  5. https://cgit.freedesktop.org/cairo/ - cairo source - look in src/ for gl backend support
  6. https://cairo.cairographics.narkive.com/acXWIWzV/does-cairo-use-hardware-acceleration - old but good discussion on using GL with Cairo.
    1. Buildroot needs Mesa added with vc4 support to get Cairo with GL.
  7. 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)

Actions #1

Updated by Hammel almost 3 years ago

  • Description updated (diff)
Actions #2

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.

  1. The EGL backend for Cairo gets enabled in Buildroot if libgles is enabled.
  2. libgles is part of the VC package installed to /opt/vc/, specifically in /opt/vc/lib.
  3. /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.

Actions #3

Updated by Hammel 7 days ago

  • Priority changed from High to Urgent
  • Target version changed from 2.0 - Harkonnen to 3.0 - Corrino
Actions #4

Updated by Hammel 7 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF