Platform/GFX/X11GLLayers

From MozillaWiki
< Platform‎ | GFX
Jump to navigation Jump to search

Overview

GL Layers are not enabled by default on X11. The primary problem is that we are still using X11 rendering APIs (XRender) that render into X pixmaps, which have poor interoperability with OpenGL (the texture_from_pixmap extension is buggy).

So we want to stop using XRender, stop using X pixmaps, and then we'll be in a place to easily enable GL layers by default.

Getting rid of X-specific APIs have several other advantages:

* It is a step forward in the direction of supporting Wayland.
* It reduces the number of platform specific APIs (Mac, Fennec and B2G use OpenGL), and make it easier for us to write new features that work on several platform out of the box (or almost), including Linux.

Some known limitations:

* We cannot have GTK2 and GTK3 symbols in the same address-space.
* plugins like Flash need GTK2.
* GTK2 needs XLib surfaces for native widget rendering (GTK3 relaxes this constraint by decoupling the gtkStyleContext from the widget, meaning that you can render a native widget into a cairo surface rather than an XLib surface).

So a prerequisite for getting rid of X surfaces is to use GTK3 instead of GTK2.

Action plan

This section is a stub. You can help wikipedia by improving it. Especially if your name is karlt or ebassi.

  • 1. Switch to GTK3
  • 2. ???
  • 3. profit!