gecko-dev/gfx/gl
Jamie Nicol 0cffcc7253 Bug 1777952 - Namespace SurfaceTexture handles by the process they were allocated in. r=gfx-reviewers,geckoview-reviewers,aosmond,calu
When Surfaces/SurfaceTextures are allocated they are given a handle,
which is a monotonically increasing 32-bit integer. To render
Surfaces, we typically pass the Surface handle to the compositor,
which then looks it up in a map to find the corresponding
SurfaceTexture.

Following a GPU process restart, content may be left with stale
handles referencing SurfaceTextures which no longer exist. Once new
SurfaceTextures are allocated, these stale handles may reference new
SurfaceTextures with no relation to the old handle. This can lead to
rendering the wrong texture. Additionally, we may crash when
allocating "sync" SurfaceTextures, as the previous sync texture for a
certain handle may not have been released yet.

To fix this, this patch combines the existing handle with a new ID
uniquely identifying the process in which the SurfaceTexture was
allocated (or 0 for the parent process). We use a monotonically
increasing value rather than the pid to guard against the new GPU
process possibly having the same pid as the previous instance. We
combine these two 32-bit integers and use the resulting 64-bit integer
as the Surface handle.

Differential Revision: https://phabricator.services.mozilla.com/D150963
2022-07-07 08:12:55 +00:00
..
AndroidNativeWindow.h
AndroidSurfaceTexture.cpp Bug 1777952 - Namespace SurfaceTexture handles by the process they were allocated in. r=gfx-reviewers,geckoview-reviewers,aosmond,calu 2022-07-07 08:12:55 +00:00
AndroidSurfaceTexture.h Bug 1777952 - Namespace SurfaceTexture handles by the process they were allocated in. r=gfx-reviewers,geckoview-reviewers,aosmond,calu 2022-07-07 08:12:55 +00:00
ForceDiscreteGPUHelperCGL.h
GfxTexturesReporter.cpp
GfxTexturesReporter.h
GLBlitHelper.cpp Bug 1778232 - ImageFormat::s/CAIRO_SURFACE/MOZ2D_SURFACE/. r=jrmuizel 2022-07-06 07:46:17 +00:00
GLBlitHelper.h Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE 2022-06-30 21:19:17 +03:00
GLBlitHelperD3D.cpp Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE 2022-06-30 21:19:17 +03:00
GLConsts.h
GLConsts.py
GLContext.cpp Bug 1751008 - Ensure we mark GLFeature::transform_feedback2 as unsupported if symbol load fails. r=jgilbert 2022-01-27 12:48:13 +00:00
GLContext.h Bug 1741175 - Remove unused GLBlitTextureImageHelper. r=gfx-reviewers,jgilbert,bradwerth 2021-11-16 00:53:16 +00:00
GLContextCGL.h
GLContextEAGL.h
GLContextEGL.h Bug 1770407 [Linux] Remove GBM GL backend r=jgilbert 2022-05-28 20:13:42 +00:00
GLContextFeatures.cpp
GLContextGLX.h Bug 1733094 - Assume UseWebRender for FindVisual, r=stransky,emilio 2021-10-06 11:30:37 +00:00
GLContextProvider.h Bug 1770111 [Linux] Build GLContextProviderLinux on other unix systems r=jgilbert 2022-05-20 12:37:08 +00:00
GLContextProviderCGL.mm
GLContextProviderEAGL.mm
GLContextProviderEGL.cpp Bug 1773377 - Try EGL device platform for headless contexts, r=stransky,jgilbert 2022-06-13 23:15:37 +00:00
GLContextProviderGLX.cpp Bug 1685375 - Remove ScopedXErrorHandler. r=jgilbert 2022-05-26 16:13:27 +00:00
GLContextProviderImpl.h
GLContextProviderLinux.cpp Bug 1769710 [Linux] Add GLContextProviderLinux for GLX/EGL r=jgilbert 2022-05-18 12:01:49 +00:00
GLContextProviderNull.cpp
GLContextProviderWGL.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana 2022-06-07 12:32:55 +00:00
GLContextSymbols.h
GLContextTypes.h
GLContextWGL.h
GLDebugUtils.cpp
GLDebugUtils.h
GLDefs.h Bug 1776470 - Explicitly ask for ANGLE debug layer iff d3d11 debug layer pref enabled. r=gfx-reviewers,bradwerth 2022-07-06 07:45:29 +00:00
GLLibraryEGL.cpp Bug 1776470 - Explicitly ask for ANGLE debug layer iff d3d11 debug layer pref enabled. r=gfx-reviewers,bradwerth 2022-07-06 07:45:29 +00:00
GLLibraryEGL.h Bug 1773377 - Try EGL device platform for headless contexts, r=stransky,jgilbert 2022-06-13 23:15:37 +00:00
GLLibraryLoader.cpp
GLLibraryLoader.h
GLReadTexImageHelper.cpp
GLReadTexImageHelper.h
GLScreenBuffer.cpp Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers 2022-06-29 09:32:29 +00:00
GLScreenBuffer.h Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers 2022-06-29 09:32:29 +00:00
GLTextureImage.cpp
GLTextureImage.h
GLTypes.h
GLUploadHelpers.cpp
GLUploadHelpers.h
GLXLibrary.h
HeapCopyOfStackArray.h
moz.build Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE 2022-06-30 21:19:17 +03:00
MozFramebuffer.cpp Bug 1756174 - gfxCriticalNote with details, instead of hard assert. r=gfx-reviewers,aosmond 2022-03-14 18:12:22 +00:00
MozFramebuffer.h
ScopedGLHelpers.cpp
ScopedGLHelpers.h
SharedSurface.cpp
SharedSurface.h Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio,webidl,smaug 2022-05-02 23:54:09 +00:00
SharedSurfaceAndroidHardwareBuffer.cpp
SharedSurfaceAndroidHardwareBuffer.h
SharedSurfaceANGLE.cpp Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE 2022-06-30 21:19:17 +03:00
SharedSurfaceANGLE.h
SharedSurfaceD3D11Interop.cpp Backed out 3 changesets (bug 1771374) for causing build bustage in gfx/gl/gtest/TestColorspaces.cpp CLOSED TREE 2022-06-30 21:19:17 +03:00
SharedSurfaceD3D11Interop.h
SharedSurfaceDMABUF.cpp Bug 1774075 [Linux] Don't use EGL_MESA_image_dma_buf_export on mesa/radeonsi driver r=jgilbert 2022-06-20 10:14:41 +00:00
SharedSurfaceDMABUF.h Bug 1735929 [Linux] Use EGL_MESA_image_dma_buf_export in SharedSurfaceDMABUF r=jgilbert,aosmond 2022-06-09 08:37:20 +00:00
SharedSurfaceEGL.cpp Bug 1750234 - Handle GPU process crash when rendering video and webgl on Android. r=jgilbert,jolin 2022-02-02 17:01:02 +00:00
SharedSurfaceEGL.h Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
SharedSurfaceGL.cpp
SharedSurfaceGL.h
SharedSurfaceIO.cpp Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio,webidl,smaug 2022-05-02 23:54:09 +00:00
SharedSurfaceIO.h
SurfaceTypes.h
WGLLibrary.h