gecko-dev/gfx/layers/opengl
Markus Stange 0f70058b6f Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert
There are multiple SurfacePools: Main thread painting and the non-WebRender compositors create a new pool per window, and WebRender creates one shared pool across all windows. The non-WebRender users set the pool size limit to zero, i.e. no recycling across paints. This preserves the pre-existing behavior.
WebRender's pool size is configurable with the gfx.webrender.compositor.surface-pool-size pref.
Every window holds on to a SurfacePoolHandle. A SurfacePoolHandle has an owning reference to the pool, via a surface pool wrapper. Once all handles are gone, the surface pool goes away, too.
The SurfacePool holds on to IOSurfaces and MozFramebuffers. Both are created on demand, independently, but are associated with each other.
A given NativeLayer uses only one surface pool handle during its lifetime. The native layer no longer influences which GLContext its framebuffers are created for; the GL context is now managed by the surface pool handle.
As a result, a NativeLayer can no longer change which GLContext its framebuffers are created by.
So in the future, if we ever need to migrate a window frome one GLContext to another, we will need to recreate the NativeLayers inside it. I think that's ok.

Differential Revision: https://phabricator.services.mozilla.com/D54859

--HG--
extra : moz-landing-system : lando
2019-12-18 21:01:51 +00:00
..
CompositingRenderTargetOGL.cpp Bug 1578099 - Tweak CompositingRenderTargetOGL initialization flow. r=mattwoodrow 2019-09-01 22:45:20 +00:00
CompositingRenderTargetOGL.h Bug 1578099 - Use NativeLayer::NextSurfaceAsFramebuffer in CompositorOGL and remove #ifdefs. r=mattwoodrow 2019-09-01 22:48:36 +00:00
CompositorOGL.cpp Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert 2019-12-18 21:01:51 +00:00
CompositorOGL.h Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert 2019-12-18 21:01:51 +00:00
EGLImageHelpers.cpp
EGLImageHelpers.h
GLBlitTextureImageHelper.cpp Bug 1289211 - Rename InfallibleTArray to nsTArray in gfx/layers/ r=mattwoodrow 2019-07-10 04:47:53 +00:00
GLBlitTextureImageHelper.h
MacIOSurfaceTextureClientOGL.cpp Bug 1540581 - P5. Add ColorSpace info to MacIOSurface. r=mattwoodrow 2019-04-11 12:36:31 +00:00
MacIOSurfaceTextureClientOGL.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
MacIOSurfaceTextureHostOGL.cpp Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
MacIOSurfaceTextureHostOGL.h Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
OGLShaderConfig.h
OGLShaderProgram.cpp Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow 2019-09-02 17:38:31 +00:00
OGLShaderProgram.h Bug 1493898 - P6. Move YUVColorSpace definition in the gfx namespace. r=mattwoodrow. 2019-04-11 12:41:33 +00:00
TextureClientOGL.cpp Bug 1538969 - Report an opaque surface format for AndroidSurfaceTextureData when it's being used for an opaque video. r=jya 2019-04-10 08:08:22 +00:00
TextureClientOGL.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
TextureHostOGL.cpp Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
TextureHostOGL.h Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
WaylandDMABUFTextureClientOGL.cpp Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureClientOGL, r=sotaro 2019-09-24 11:05:14 +00:00
WaylandDMABUFTextureClientOGL.h Bug 1578380 - [Wayland] Implement WaylandDMABUFTextureClientOGL, r=sotaro 2019-09-24 11:05:14 +00:00
WaylandDMABUFTextureHostOGL.cpp Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
WaylandDMABUFTextureHostOGL.h Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw 2019-12-06 06:53:57 +00:00
X11TextureSourceOGL.cpp
X11TextureSourceOGL.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00