Граф коммитов

2307 Коммитов

Автор SHA1 Сообщение Дата
Robert Mader 27ed750ccc Bug 1733094 - Assume UseWebRender for FindVisual, r=stransky,emilio
`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
2021-10-06 11:30:37 +00:00
Cristian Tuns ae2fa375ec Backed out changeset 94ec92a5e99f (bug 1733094) for causing mochitest failures on test_drawWindow_widget_layers.html. CLOSED TREE 2021-10-04 19:45:34 -04:00
Robert Mader d7319e8f22 Bug 1733094 - Assume UseWebRender for FindVisual, r=stransky,emilio
`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
2021-10-04 20:28:24 +00:00
stransky f6f64f06d3 Bug 1733057 [Linux] Return early when XWindow handle is missing at GLContextProviderGLX::CreateForWidget(), r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D126889
2021-09-30 07:11:19 +00:00
stransky ac3b9d1e54 Bug 1729656 [Wayland] Don't use gfxPlatform to configure DMABuf, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D126821
2021-09-28 20:16:17 +00:00
Jeff Gilbert ad26ba8eea Bug 1717151 - Move EGL_EXT_device_query from device exts to client exts. r=gfx-reviewers,lsalzman
This moved due to a fix in ANGLE 56663dbfa78 on 2020-nov-19.

Differential Revision: https://phabricator.services.mozilla.com/D125748
2021-09-16 18:24:32 +00:00
Sandor Molnar d8d7539593 Backed out 3 changesets (bug 1717151) for causing webgl failures in vector-matrix-constructor-scalarization. CLOSED TREE
Backed out changeset bd3e2c874f3d (bug 1717151)
Backed out changeset 3154db5a81cf (bug 1717151)
Backed out changeset 05bd12e339df (bug 1717151)
2021-09-16 10:29:11 +03:00
Jeff Gilbert d6aa54df00 Bug 1717151 - Move EGL_EXT_device_query from device exts to client exts. r=gfx-reviewers,lsalzman
This moved due to a fix in ANGLE 56663dbfa78 on 2020-nov-19.

Differential Revision: https://phabricator.services.mozilla.com/D125748
2021-09-15 22:20:32 +00:00
Matt Woodrow c19e47f6c4 Bug 1729841 - Remove TextureDIB. r=jgilbert,gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D125023
2021-09-15 04:09:43 +00:00
Jeff Muizelaar 4d2306308f Bug 1728991 - Drop some unused gfxASurface includes. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124456
2021-09-03 16:00:34 +00:00
Nicolas Silva d7ea7c6d5f Bug 1728651 - Silence a warning. r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D124322
2021-09-02 16:14:44 +00:00
Nicolas Silva 7d160f6bbc Bug 1728350 - Remove remaining texture-from-pixmap usage. r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D124093
2021-09-01 17:07:46 +00:00
Nicolas Silva d7da7d12a4 Bug 1728350 - Remove SharedSurfaceX11. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D124084
2021-09-01 17:07:45 +00:00
Jeff Gilbert fa284e5717 Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-27 01:47:14 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
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
2021-08-25 10:46:17 +00:00
Jeff Gilbert 0d6f7f1c2b Bug 1726863 - Cache/elide GLContext::BindFramebuffer calls. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D123275
2021-08-23 23:59:26 +00:00
Csoregi Natalia 8d7a78b944 Backed out changeset fd92f897de07 (bug 1726863) for causing assertion failures on ContentCompositorBridgeParent.cpp. CLOSED TREE 2021-08-24 01:34:22 +03:00
Jeff Gilbert 16b629d8de Bug 1726863 - Cache/elide GLContext::BindFramebuffer calls. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D123275
2021-08-23 21:54:29 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Csoregi Natalia a3124addd1 Backed out changeset ef1d6ccf8d61 (bug 1726863) for causing assertion failures on CompositorBridgeParent.cpp. CLOSED TREE 2021-08-21 09:15:08 +03:00
Jeff Gilbert aa8340500e Bug 1726863 - Cache/elide GLContext::BindFramebuffer calls. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D123275
2021-08-21 02:08:23 +00:00
Butkovits Atila 477919f37c Backed out changeset a4a346ecefd7 (bug 1726265) for causing failures at test_2_conformance2__extensions__oes-draw-buffers-indexed.html. CLOSED TREE 2021-08-21 01:46:52 +03:00
Jeff Gilbert 28e862be2d Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 20:59:54 +00:00
Cosmin Sabou 135d55cd7e Backed out changeset 24e0d3aa4ada (bug 1726265) for causing non-unified build bustage. CLOSED TREE 2021-08-20 04:29:04 +03:00
Jeff Gilbert df78036187 Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D122916
2021-08-20 00:05:06 +00:00
Jeff Gilbert 16e47c00fa Bug 1725714 - Load glTexSubImage3DOES for texture_3D. r=gfx-reviewers,jrmuizel
Also drop support for the 1996 ext EXT_texture3D, particularly since
GLFeature::texture_3D is core in GL1.2.

Differential Revision: https://phabricator.services.mozilla.com/D122644
2021-08-14 00:07:19 +00:00
Jeff Gilbert 1ab2048d63 Bug 1657189 - Avoid GetFragDataLocation('gl_*') on Mesa. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D122406
2021-08-12 01:35:15 +00:00
Robert Mader 02ec3a3ab0 Bug 1702546 - Update GLConsts.h, r=jgilbert
This is required for D110604

Differential Revision: https://phabricator.services.mozilla.com/D121704
2021-08-04 17:46:57 +00:00
Dorel Luca 585240571a Backed out 2 changesets (bug 1717151) for Crashtest failures in dom/media/gmp/GMPServiceParent.cpp. CLOSED TREE
Backed out changeset adc225dcc004 (bug 1717151)
Backed out changeset 0ca0354e2a44 (bug 1717151)
2021-08-03 01:56:11 +03:00
Jeff Gilbert 002654edda Bug 1717151 - Move EGL_EXT_device_query from device exts to client exts. r=lsalzman
This moved due to a fix in ANGLE 56663dbfa78 on 2020-nov-19.

Differential Revision: https://phabricator.services.mozilla.com/D121561
2021-08-02 19:10:37 +00:00
Mike Hommey 03223f9ea4 Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi
Differential Revision: https://phabricator.services.mozilla.com/D121066
2021-07-29 23:38:31 +00:00
Csoregi Natalia 1439cf57eb Backed out 2 changesets (bug 1717151) for causing bustage on validationEGL.h. CLOSED TREE
Backed out changeset 06d6ad49726c (bug 1717151)
Backed out changeset ee22b6243926 (bug 1717151)
2021-07-29 22:52:24 +03:00
Jeff Gilbert 555b7c9143 Bug 1717151 - Move EGL_EXT_device_query from device exts to client exts. r=lsalzman
This moved due to a fix in ANGLE 56663dbfa78 on 2020-nov-19.

Differential Revision: https://phabricator.services.mozilla.com/D121216
2021-07-29 19:16:32 +00:00
Emilio Cobos Álvarez 459155ff4c Bug 1712588 Implement DMABufSurface::GetAsSourceSurface. r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D116411
2021-07-15 16:19:51 +00:00
stransky 4c52dbd0a1 Bug 1712588 Remove unnecessary asserts for gfx::Factory::CopyDataSourceSurface(), r=jgilbert
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
2021-07-15 16:00:45 +00:00
Robert Mader f691c9ecf9 Bug 1718569 - Implement custom FBO management, r=jgilbert,gfx-reviewers
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
2021-07-13 13:44:12 +00:00
Sandor Molnar 6c075398dd Backed out 2 changesets (bug 1718570, bug 1718569) for causing wpt failures in /css/css-flexbox/flexbox-align-self-vert-001. CLOSED TREE
Backed out changeset 59cdbaaa6a7b (bug 1718570)
Backed out changeset 489ce763c140 (bug 1718569)
2021-07-13 08:52:28 +03:00
Robert Mader f3231d9976 Bug 1718569 - Implement custom FBO management, r=jgilbert,gfx-reviewers
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
2021-07-13 00:55:29 +00:00
Jed Davis 2257145e1c Bug 1635451 - Minimize content processes' connections to the X server. r=jgilbert,stransky,nika
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
2021-07-06 07:42:42 +00:00
Jed Davis dc3ae62544 Bug 1635451 - Allow GLX to work in headless content processes. r=jgilbert
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
2021-07-06 07:42:42 +00:00
Jeff Muizelaar fc208a231c Bug 1712367. Avoid TexSubImage ES slow path. r=jgilbert,sotaro
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
2021-06-17 13:24:05 +00:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Jeff Muizelaar a7817816b7 Bug 1716559 - Remove TextureImageEGL. r=jnicol,jgilbert
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
2021-06-15 21:10:47 +00:00
Dorel Luca 2190a59721 Backed out changeset c30c8b8dc0b5 (bug 1715902) on Dev's request. CLOSED TREE 2021-06-11 15:48:11 +03:00
Andrew Osmond 330727f6e8 Bug 1715902 - Refuse WebRender on Linux if backed by software driver. r=jrmuizel
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
2021-06-11 12:16:36 +00:00
Robert Mader de931f5505 Bug 1712472 - Reenable depth-buffer in EGL config if native compositor is used, r=jgilbert,gw
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
2021-05-25 08:03:28 +00:00
Jeff Muizelaar 4e1bc5a36f Bug 1711490 - Stop using allocating a depth buffer for the main window. r=nical
In bug 1696905 we removed our need for depth buffer when running the
composite shader.

Differential Revision: https://phabricator.services.mozilla.com/D115216
2021-05-17 19:54:35 +00:00
Robert Mader 76023e93e9 Bug 1709606 - Rename CompositorWidget::AsX11() to CompositorWidget->AsGTK(), r=stransky,nical
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
2021-05-07 12:31:28 +00:00
stransky 8ff3771ef2 Bug 1704965 [Linux] Remove display connection from nsWindow, CompositorWidgetParent and WindowSurfaceProvider, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D113643
2021-05-04 13:04:35 +00:00
Jed Davis 2f12c6ea18 Bug 1702394 - Work around small memory leaks in Mesa drivers. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D112194
2021-04-30 16:20:15 +00:00