Platform/GFX/WebGL/Backends

From MozillaWiki
< Platform‎ | GFX‎ | WebGL
Jump to: navigation, search

WebGL Backends

WebGL Backend Platforms Compositing Accelerators Notes
Native GL2+ [1] WGL (windows), CGL (mac), GLX (linux) GLTexture sharing Investigating GL/DX-Texture interop
Native GLES2+ EGL (android) OMTC?
ANGLE GLES2 EGL (windows) EGLSurface sharing ANGLE is actually DX+D3D9

Available Layer Managers

Layer Manager Platforms Compatible Compositing Accelerations Notes
D3D10 Windows Vista/7 EGLSurface interop Investigating GL/DX-Texture interop
D3D9 Windows XP/Vista/7 ReadPixels Investigating GL/DX-Texture interop
OGL Mac, Linux GLTexture sharing
Basic All ReadPixels

Expected Platform/Layers/WebGL Combinations

Platform Backend 1 (Compositing Accel) Backend 2 (Compositing Accel) Notes
Windows Vista/7 D3D10, ANGLE EGL+GLES2 (EGLSurface sharing) [1] D3D10, WGL, Native GL (None)
Windows XP D3D9, ANGLE EGL+GLES2 (None) [1] D3D9, WGL, Native GL (None)
Mac OGL, CGL, Native GL (GLTexture sharing) Basic, CGL, Native GL (None)
Linux [2] OGL, GLX, Native GL (GLTexture sharing) Basic, GLX, Native GL (None)
Android Basic, EGL, Native GLES (None)

[1] WGL+GL backend is not used as fallbacks if ANGLE fails to initialize. That is, if we try to load ANGLE and fail, we will no longer fall back to WGL+GL. (For the time being)

[2] OGL Layers is blocked on (almost?) all linux platforms.

Platform Layers Backends

If you're finding yourself unaccelerated, you can use layers.acceleration.force-enabled to force layers acceleration.

Windows

Available Layers backends: D3D10*, D3D9, OGL*, Basic

Our default here is D3D10, but as D3D10 is not available on Windows XP, XP defaults to D3D9. While there's no technical reason OGL Layers cannot work on Windows, it is not a supported configuration, and (at present) does not seem to render properly.

  • Enabled D3D9 Layers with layers.prefer-d3d9
  • Enabled OGL Layers with layers.prefer-opengl

Mac

Available Layers backends: OGL, Basic

Our default is OGL.

Linux

Available Layers backends: OGL, Basic

Our default is theoretically OGL, but it is blacklisted basically universally on linux. In practice, you'll find Basic Layers is the default here, but you can use force-enable Layers acceleration to use OGL layers.

Platform GL Providers

WebGL can be force-enabled with webgl.force-enabled.

Windows

By default, we don't actually run on the machine's native OpenGL libraries, but rather on ANGLE, which in turn runs on D3D9. ANGLE provides an implementation of GLES2 on top of EGL.

However, running on the machine's native OpenGL implementation on top of WGL is possible with webgl.prefer-native-gl.


Mac and Linux

Mac and Linux are very similar, in though mac is provided on top of CGL, and Linux is generally provided on top of GLX.