- 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
> /builds/worker/checkouts/gecko/gfx/gl/SharedSurface.cpp:141:1: error: control reaches end of non-void function [-Werror=return-type]
Old compilers don't realize the switch being exhaustive means the
function always returns, which we workaround here.
Differential Revision: https://phabricator.services.mozilla.com/D78837
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
to propagate
* Mortgage/strip out more OffscreenCanvas code for now
Differential Revision: https://phabricator.services.mozilla.com/D75055
> /builds/worker/checkouts/gecko/gfx/gl/SharedSurface.cpp:141:1: error: control reaches end of non-void function [-Werror=return-type]
Old compilers don't realize the switch being exhaustive means the
function always returns, which we workaround here.
Differential Revision: https://phabricator.services.mozilla.com/D78837
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
to propagate
* Mortgage/strip out more OffscreenCanvas code for now
Differential Revision: https://phabricator.services.mozilla.com/D75055
> /builds/worker/checkouts/gecko/gfx/gl/SharedSurface.cpp:141:1: error: control reaches end of non-void function [-Werror=return-type]
Old compilers don't realize the switch being exhaustive means the
function always returns, which we workaround here.
Differential Revision: https://phabricator.services.mozilla.com/D78837
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
to propagate
* Mortgage/strip out more OffscreenCanvas code for now
Differential Revision: https://phabricator.services.mozilla.com/D75055
The flag is not required for SharedSurface_SurfaceTexture, as
GeckoSurfaceTexture is reference counted. When the GeckoSurface is
disposed on the client side it simply decrements the refcount of the
GeckoSurfaceTexture on the host side, which will remain alive until
the TextureHost's reference is also dropped.
Differential Revision: https://phabricator.services.mozilla.com/D79073
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
to propagate
* Mortgage/strip out more OffscreenCanvas code for now
Differential Revision: https://phabricator.services.mozilla.com/D75055
EGL with buffer-age requires the application to keep the front buffer
fully consistent. This means we have to draw the previous frame's
damage as well. (But we don't need to include it in the hint we're
sending to the system compositor via SwapBuffersWithDamage.)
Differential Revision: https://phabricator.services.mozilla.com/D61062
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.
Differential Revision: https://phabricator.services.mozilla.com/D75377
In WebVR we destroy the mVRScreen after presentation is exited by calling WebGLContext::ClearVRFrame(). We found that when having multiple windows with active WebGL contexts in Firefox Reality, the WebGL context dies a lot, and you have to reload the page to recover from it. The problem is that when the GLScreenBuffer is destroyed the EGLContext still keeps a reference to the destroyed surface, set by gl->SetEGLSurfaceOverride(surface), which can break the future eglMakeCurrent calls.
Differential Revision: https://phabricator.services.mozilla.com/D75413
In the past EGL only supported GLES, not OGL. This has not been true
for a very long time, so lets support OGL context creation in the EGL
backend.
This allows e.g. the Wayland backend to use OGL contexts, which brings
it on par with the X11/GLX backend.
Differential Revision: https://phabricator.services.mozilla.com/D48096