Implement GLContextEGL::FindVisual() as a EGL counterpart of GLContextGLX::FindVisual() used
by GLX.
We need to make sure that GdkWindow uses the same visual as GL framebuffer we use for it.
That was already implemented for GLX backend (Bug 1478454).
The visual match is implemented by visual parameter at CreateConfig()/CreateConfigScreen() routines and when it's non-zero,
try to find exact match based on visual ID.
Differential Revision: https://phabricator.services.mozilla.com/D87636
Implement GLContextEGL::FindVisual() as a EGL counterpart of GLContextGLX::FindVisual() used
by GLX.
We need to make sure that GdkWindow uses the same visual as GL framebuffer we use for it.
That was already implemented for GLX backend (Bug 1478454).
The visual match is implemented by visual parameter at CreateConfig()/CreateConfigScreen() routines and when it's non-zero,
try to find exact match based on visual ID.
Differential Revision: https://phabricator.services.mozilla.com/D87636
- Restore active texture when dmabuf texture is created at DMABufSurfaceRGBA::CreateTexture()/DMABufSurfaceYUV::CreateTexture.
- Provide more logging for DMABufSurfaceRGBA surfaces.
- Implement DMABufSurfaceRGBA::DumpToFile() to save dmabuf surface content to png file.
Differential Revision: https://phabricator.services.mozilla.com/D88382
On recent android, EGL_ANDROID_native_fence_sync support is not reported even when eglDupNativeFenceFDANDROID() exists.
Differential Revision: https://phabricator.services.mozilla.com/D87995
This largely reverts D81868, only keeping what's needed to make SwapBuffersWithDamage
work, and also adds BufferAge support to RenderCompositorOGL.
Differential Revision: https://phabricator.services.mozilla.com/D85565
This is meant to save us in cases where the message loop in GPU process
receives commands related to resources that point to the old EGL context
that was just shut down. Since the symbols are erased, we'd end up with
trying to execute a nullptr on `MakeCurrent()`. With marking the context
as lost, however, no symbols will be accessed.
Differential Revision: https://phabricator.services.mozilla.com/D84868
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.
Differential Revision: https://phabricator.services.mozilla.com/D83674
- WaitForBufferOwnership() must be called before locking the front buffer
- Use mDefaultFB->mFB instead of 0 to fix a freeze in the readPixels call
- SurfaceTexture.releaseTexImage must be called after each use
Differential Revision: https://phabricator.services.mozilla.com/D82944
There are some code paths where CreateSurfaceFromNativeWindow can be called without the GLLibraryEGL::EnsureInitialized check
Differential Revision: https://phabricator.services.mozilla.com/D81990
AHardwareBuffer is supported since Android O(APIVersion 26). Implementation of AndroidHardwareBufferTextureData referred AndroidNativeWindowTextureData. Implementation of AndroidHardwareBufferTextureHost referred obsoleted GrallocTextureHost.
android fence is not supported yet.
Differential Revision: https://phabricator.services.mozilla.com/D81808
Patch by Robert Mader [:rmader]
This enables support for EGL on X11, toggled by setting the
MOZ_X11_EGL env variable. It allows running the Webrender
and OpenGL compositors basically like we do with GLX by default.
Note that that there are several things missing:
- no pixmap sharing support (not clear if we want/need it)
- it still uses GLX for several things like finding the X11 visual, VSync and glxtest.
It includes some cleanups, mostly in order to decouple the X11
and Wayland implementations a bit more.
Differential Revision: https://phabricator.services.mozilla.com/D76417
We change DMABuf config keys from Wayland specific to universal ones as they can be used in both X11 and Wayland backends.
Depends on D81515
Differential Revision: https://phabricator.services.mozilla.com/D81516
This works around Android implementations that allow for non-ES contexts
to be created even though they don't work properly.
Differential Revision: https://phabricator.services.mozilla.com/D81666
No functional change. AndroidSurfaceTexture related files are used on all platforms. They are needed only on Android.
Differential Revision: https://phabricator.services.mozilla.com/D80869
- Enable WebGL SwapChain pooling on Android. Creating and releasing Android Surfaces every frame causes a big performance hit due to AndroidSurface slow destructors bug.
- Add a separate SwapChain for WebVR. We are already using separate SwapChains for WebXR (WebGLFramebuffer::mOpaqueSwapChain) but not for WebVR (it uses the canvas backbuffer).
Differential Revision: https://phabricator.services.mozilla.com/D79840