`gfxVars::UseWebRender()` now always returns `true`, thus stop passing
it around as argument. And as HW-WR unconditionally requires an alpha
channel, remove that from the code as well.
While on it, also stop requesting a depth buffer. It's not needed any
more after D113532 and D115216.
Finally, some small drive-by cleanups.
Differential Revision: https://phabricator.services.mozilla.com/D126922
`gfxVars::UseWebRender()` now always returns `true` thus stop passing
it around as argument.
At the same time, WR does not require a depth buffer any more, thus
stop requesting it when choosing a matching XVisual.
While on it, also stop requesting an alpha channel were it shouldn't
be needed. This point will require some regression testing, making
this patch 95 material.
Differential Revision: https://phabricator.services.mozilla.com/D126922
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.
This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.
Differential Revision: https://phabricator.services.mozilla.com/D122345
gfx::Factory::CopyDataSourceSurface() was updated so LOCAL_GL_RGBA readFormat and LOCAL_GL_UNSIGNED_BYTE readType is already supported.
Differential Revision: https://phabricator.services.mozilla.com/D118303
Instead of using the Wayland EGL platform. The later is very convenient
but has several limitations. Managing FBOs allows to make our code more
similar to that of MacOS as well as the Wayland software backend.
Most importantly, it will allow us to cleanly implement partial damage
by giving us direct acces to previously submitted buffers, allowing us
to blit back from them, similar like in
`NativeLayerCA::HandlePartialUpdate`.
There are several other fields where more control over buffers will
come in handy, too many to describe them here in detail.
Note: we still use individual buffer pools for each tile. However, this
change brings everything into place to allow us to change to a more
`SurfacePoolCA`-style shared pool. That will reduce GPU-memory usage.
Includes some minor cleanups here and there.
Depends on D119013
Differential Revision: https://phabricator.services.mozilla.com/D118925
Instead of using the Wayland EGL platform. The later is very convenient
but has several limitations. Managing FBOs allows to make our code more
similar to that of MacOS as well as the Wayland software backend.
Most importantly, it will allow us to cleanly implement partial damage
by giving us direct acces to previously submitted buffers, allowing us
to blit back from them, similar like in
`NativeLayerCA::HandlePartialUpdate`.
There are several other fields where more control over buffers will
come in handy, too many to describe them here in detail.
Note: we still use individual buffer pools for each tile. However, this
change brings everything into place to allow us to change to a more
`SurfacePoolCA`-style shared pool. That will reduce GPU-memory usage.
Includes some minor cleanups here and there.
Depends on D119013
Differential Revision: https://phabricator.services.mozilla.com/D118925
This patch launches content processes with the `MOZ_HEADLESS` env var set
if they're using GTK with an X11 display (and there's no other reason
they'd need GTK).
The goal is to avoid exhausting Xorg's default limit of 256 clients if
there are many content processes due to Fission. If these conditions
are met, the content process doesn't need to eagerly connect to the X
server. This does not affect the sandbox policy, and content processes
can still use X if needed for, e.g., WebGL.
The boolean pref `dom.ipc.avoid-gtk`, set by default, controls this
feature. In the future it could also be extended to minimize GTK use
with Wayland displays.
Note that disabling `widget.non-native-theme.enabled`, which is also
enabled by default, will restore the use of X11 in all content processes
even if this pref is set; the alternative is that widgets wouldn't render
in that case.
This change will also save some memory for now-unnecessary instances of
GTK's global state, and improve content process startup time.
Remove also the temp pref dom.ipc.remote-mozIcon because it cannot work
anymore with the content process being headless.
Differential Revision: https://phabricator.services.mozilla.com/D112197
This follows what we're already doing for EGL: a refcounted object
which can own the X connection, where we hold a weak reference from
the library object so that multiple contexts opportunistically share
the display but we close the connection when the last context is
freed/GCed.
In a process where GTK is initialized, we borrow its display instead of
opening a new one, which preserves the existing behavior.
Differential Revision: https://phabricator.services.mozilla.com/D112195
Instead of drawing updates into the correct spot in the destination
DataSourceSurface we just use it as scratch space and always
draw in the top-left with stride = bpp*width.
We add a dstOffset to the upload functions to support using
a subsurface.
Differential Revision: https://phabricator.services.mozilla.com/D116501
TextureImageEGL doesn't seem to provide any value beyond
BasicTextureImage. It's last usage was bug 814159.
Removing this has the side effect of using BasicTextureImage
for small images instead of always using TilingTextureImage.
Differential Revision: https://phabricator.services.mozilla.com/D117904
When trying to create a GLContextEGL or GLContextGLX, we should check to
see what our display is backed by. If using a software driver, we should
fail to create the context for WebRender, so that it can fallback to
Software WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D117473
After D113532, a depth-buffer is not needed any more for the draw
compositor and it was subsequently removed from the EGL and GLX
context providers in D115216. This, however, broke the experimental
Wayland native compositor integration, which still needs it.
`SurfacePoolCA` solves this by manually attaching a depth buffer in
`CreateFramebufferForTexture`. `SurfacePoolWayland` will likely be
able to do the same eventually, however until that is the case
we need the GL context to provide it.
While on it, move the hardcoded bits into a better place below the
hard-coded values for ANGLE and remove now used code to make things
less cluttered.
Context: the `aDepth` argument was introduced in D76417 for EGL on X11
support, which used `RenderCompositorOGL`. This was changed in D108508,
making X11/EGL use `RenderCompositorEGL` instead, which uses a shared
GL singleton. This again required the color depth to be independent of
the window, so 32bit color depth was hardcoded in D109737. Therefore,
the `aDepth` and other things introduced in D76417 can be removed again.
Finally, it was found that we only need 32bit depth when used with
HW-WR, see also D114959.
Differential Revision: https://phabricator.services.mozilla.com/D115760
Nowadays we often use it for Wayland, which is confusing. Also, it
has a bunch of GTK specific functions, which an alternative X11
implementation would like not have. So a explicit name is probably
deserved.
Depends on D114424
Differential Revision: https://phabricator.services.mozilla.com/D114425