Commit graph

91 commits

Author SHA1 Message Date
Robert Mader
6d891cc4ba Bug 1710532 - Some Wayland/X11 related cleanups in WindowSurfaceProvider, r=stransky
And while on it, also clean up `moz.build` a bit in the same regard.
No functional changes intended.

Differential Revision: https://phabricator.services.mozilla.com/D114799
2021-05-11 09:44:39 +00:00
Greg V
c34911209c Bug 1580595 - [Wayland] Add support for pointer lock via relative-pointer and pointer-constraints r=stransky,rmader,emilio
On Wayland, it is not possible to warp the pointer.
To use the appropriate protocols, new IPC messages were added for supporting
a platform's native pointer locking mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D102114
2021-04-22 14:56:43 +00:00
stransky
33c1175041 Bug 1706624 [Wayland] Use wl_seat0 from Gtk, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D112965
2021-04-21 17:29:21 +00:00
Robert Mader
801844c76c Bug 1699985 - Add wp_viewporter protocol, r=stransky
This protocol allows cropping and scaling of surfaces and is
required for native compositor integration.

Differential Revision: https://phabricator.services.mozilla.com/D111081
2021-04-07 11:11:41 +00:00
stransky
dc24c155c2 Bug 1702606 [Wayland] Don't call mWaylandDisplay::WaitForSyncEnd() from Compositor/Render thread, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D110590
2021-04-02 14:26:20 +00:00
Jan Alexander Steffens (heftig)
4920407bb3 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-11 14:32:53 +00:00
Narcis Beleuzu
198358fc15 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig)
1261a74d17 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
stransky
2ef0cb2551 Bug 1685055 [Wayland] Post SyncBegin() to main thread only and remove thread specific code as it's unused, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D101157
2021-01-12 21:07:22 +00:00
stransky
45a9baf489 Bug 1685055 [Wayland] Dispatch Wayland display queue in main thread only, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D101156
2021-01-11 20:31:18 +00:00
Bogdan Tara
0545759f73 Backed out 2 changesets (bug 1685055) for nsWaylandDisplay related bustage CLOSED TREE
Backed out changeset 813da913ec72 (bug 1685055)
Backed out changeset c46c76db0a48 (bug 1685055)
2021-01-11 22:27:24 +02:00
stransky
e8802ce8e3 Bug 1685055 [Wayland] Post SyncBegin() to main thread only and remove thread specific code as it's unused, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D101157
2021-01-11 19:58:04 +00:00
stransky
b18d5b9051 Bug 1685055 [Wayland] Dispatch Wayland display queue in main thread only, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D101156
2021-01-11 19:57:57 +00:00
stransky
9be10fea0c Bug 1648698 [Wayland] Move nsWaylandDisplay::SyncBegin() out of FlushPendingCommitsLocked() call, r=rmader
- Move nsWaylandDisplay::SyncBegin() out of FlushPendingCommitsLocked() call to avoid a deadlock there
- Rename FlushPendingCommitsInternal() to FlushPendingCommitsLocked() to clearly state it operates on locked surface only.
- Implement nsWaylandDisplay::QueueSyncBegin() which delays SyncBegin() execution untill recent event batch is finished
  and use it instead of SyncBegin().

Differential Revision: https://phabricator.services.mozilla.com/D100384
2021-01-04 20:32:31 +00:00
Martin Stransky
4f499c0c54 Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya,glandium,jgilbert
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.
- Move mozva.cpp to mozva.c due to linking issues

Depends on D90556

Differential Revision: https://phabricator.services.mozilla.com/D90557
2020-12-08 15:26:09 +00:00
Butkovits Atila
6772473e85 Backed out 4 changesets (bug 1660336) for causing build bustage on libmozavcodec.so. CLOSED TREE
Backed out changeset 13936ff79b4c (bug 1660336)
Backed out changeset 7315e7b327f7 (bug 1660336)
Backed out changeset b6ca98c5a3cc (bug 1660336)
Backed out changeset fb8fee4471de (bug 1660336)
2020-12-04 12:40:28 +02:00
Martin Stransky
ae3e1f1aac Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya,glandium,jgilbert
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.

Depends on D90556

Differential Revision: https://phabricator.services.mozilla.com/D90557
2020-12-04 09:41:46 +00:00
Razvan Maries
4d377757b2 Backed out 6 changesets (bug 1660336) for multiple perma failures. CLOSED TREE
Backed out changeset 0f7b1edcd999 (bug 1660336)
Backed out changeset b43bed57327d (bug 1660336)
Backed out changeset 6c74e8eef334 (bug 1660336)
Backed out changeset 5575575cc0c4 (bug 1660336)
Backed out changeset 6fb988919317 (bug 1660336)
Backed out changeset 04056b5c72d9 (bug 1660336)
2020-11-29 01:11:43 +02:00
Martin Stransky
d27e30a0c9 Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya,glandium,jgilbert
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D90557
2020-11-28 09:45:21 +00:00
Csoregi Natalia
3bbe4dde1f Backed out 6 changesets (bug 1660336) for causing media related failures. CLOSED TREE
Backed out changeset 1aa6c9d65403 (bug 1660336)
Backed out changeset f1dadb052d3a (bug 1660336)
Backed out changeset bdf9d27bd4d2 (bug 1660336)
Backed out changeset 373a658bb281 (bug 1660336)
Backed out changeset 5ccda5ab6563 (bug 1660336)
Backed out changeset e6f396b25887 (bug 1660336)
2020-11-27 05:08:40 +02:00
Martin Stransky
24a4ddcc49 Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D90557

Depends on D90556
2020-11-26 21:25:52 +00:00
stransky
1f80023b70 Bug 1675453 [Wayland] Include DMABufLibWrapper.h in nsWaylandDisplay.h header and update wayland headers, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D95992
2020-11-06 14:13:20 +00:00
Robert Mader
71f8bab55f Bug 1667674 - [Wayland] Support public primary-selection unstable protocol. r=stransky
This is required to support pasting the primary selection into Firefox on compositors only
supporting the public protocol, such as KWin. Getting the selection *from* Firefox is done
via GTK and will be supported from GTK 3.24.23 on.

The public protocol, while practically identical, will replace the gtk-private one eventually.
However, support for the private one will still be needed for a while.

Note: this also updates the auto-generated gtk-primary-selection files.

Differential Revision: https://phabricator.services.mozilla.com/D91594
2020-10-02 09:13:06 +00:00
Narcis Beleuzu
c3f877ffe4 Backed out changeset 499103fc4ccb (bug 1667674) for bc failures on browser_aboutCertError_offlineSupport.js . CLOSED TREE 2020-09-30 21:50:27 +03:00
stransky
3ee15b3859 Bug 1664911 [Wayland] Use DRM modifiers for WebGL surfaces, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D90168
2020-09-30 13:14:05 +00:00
Robert Mader
8397a4676b Bug 1667674 - [Wayland] Support public primary-selection unstable protocol. r=stransky
This is required to support pasting the primary selection into Firefox on compositors only
supporting the public protocol, such as KWin. Getting the selection *from* Firefox is done
via GTK and will be supported from GTK 3.24.23 on.

The public protocol, while practically identical, will replace the gtk-private one eventually.
However, support for the private one will still be needed for a while.

Note: this also updates the auto-generated gtk-primary-selection files.

Differential Revision: https://phabricator.services.mozilla.com/D91594
2020-09-30 12:35:49 +00:00
Butkovits Atila
1c3507c950 Backed out changeset 9811cad69b2c (bug 1664911) for causing build bustage on nsWaylandDisplay.h. CLOSED TREE 2020-09-29 14:47:26 +03:00
stransky
d14d6c3e76 Bug 1664911 [Wayland] Use DRM modifiers for WebGL surfaces, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D90168
2020-09-29 09:32:54 +00:00
stransky
77af5a272b Bug 1662425 [Wayland] Create nsWaylandDisplay as ref counted, r=jhorak
- Create nsWaylandDisplay as a ref-counted struct to avoid potential delete when a display is used.
- Don't use Mutex to access all display array operations. Use only write mutex when the array is modified / released.
- Store all wayland displays in nsTArray instead of fixed plain C array.
- Release all displays before we close Gtk display to make sure we quit before Gtk connections are closed.

Differential Revision: https://phabricator.services.mozilla.com/D89188
2020-09-04 10:54:49 +00:00
Jan Alexander Steffens (heftig)
b8594b12d2 Bug 1648872 - Add WaylandRegistryBind, a portable wl_registry_bind. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D89219
2020-09-03 19:05:48 +00:00
Brindusan Cristian
678576577a Backed out changeset 00a41c5183d7 (bug 1662425) for linux leakcheck failures. CLOSED TREE 2020-09-03 17:15:01 +03:00
stransky
333b3cf8ca Bug 1662425 [Wayland] Create nsWaylandDisplay as ref counted, r=jhorak
- Create nsWaylandDisplay as a ref-counted struct to avoid potential delete when a display is used.
- Don't use Mutex to access all display array operations. Use only write mutex when the array is modified / released.
- Store all wayland displays in nsTArray instead of fixed plain C array.
- Release all displays before we close Gtk display to make sure we quit before Gtk connections are closed.

Differential Revision: https://phabricator.services.mozilla.com/D89188
2020-09-03 13:30:30 +00:00
Brindusan Cristian
1d151de974 Backed out changeset 6a8ca967e963 (bug 1648872) for linux build bustages at nsWaylandDisplay.h. CLOSED TREE 2020-09-03 12:31:14 +03:00
Jan Alexander Steffens (heftig)
da2b882fed Bug 1648872 - Add WaylandRegistryBind, a portable wl_registry_bind. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D89219
2020-09-03 09:14:42 +00:00
Robert Mader
1e96614739 Bug 1654687 - Remove some more GTK3-version related checks, r=stransky
They are all present since 3.8. Also bumb a version check.

Differential Revision: https://phabricator.services.mozilla.com/D84899
2020-07-26 13:20:13 +00:00
Martin Stransky
f13a78bbb2 Bug 1655026 [Linux] Move dmabuf format setup from nsWaylandDisplay to nsDMABufDevice, r=rmader
Migrate DRM pixel format setup from nsWaylandDiplay to nsDMABufDevice so we don't need nsWaylandDisplay connection
to create a dmabuf surface.

It reduces wayland display connections, saves resources and allows to create dmabuf surfaces on X11 EGL config.

Differential Revision: https://phabricator.services.mozilla.com/D84900
2020-07-26 13:02:56 +00:00
Martin Stransky
8fc11cb1ca Bug 1645734 [Wayland] Move gbm library interface from nsWaylandDisplay, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D79695
2020-06-23 06:27:09 +00:00
Martin Stransky
48eab6d50c Bug 1629788 [Wayland] Add widget.wayland-dmabuf-video-textures.enabled preference, r=jhorak
- widget.wayland-dmabuf-video-textures.enabled controls dmabuf texture backend for decoded video frames.

Differential Revision: https://phabricator.services.mozilla.com/D78293
2020-06-13 18:38:45 +00:00
Bogdan Tara
f3d007c8fd Backed out 3 changesets (bug 1629788) for WaylandDMABufSurface.cpp related bustages CLOSED TREE
Backed out changeset 31fba4d1fe1d (bug 1629788)
Backed out changeset 9d1e4da287a6 (bug 1629788)
Backed out changeset 23791ccf64dd (bug 1629788)
2020-06-13 13:56:04 +03:00
Martin Stransky
ef2c5466dd Bug 1629788 [Wayland] Add widget.wayland-dmabuf-video-textures.enabled preference, r=jhorak
- widget.wayland-dmabuf-video-textures.enabled controls dmabuf texture backend for decoded video frames.

Differential Revision: https://phabricator.services.mozilla.com/D78293
2020-06-13 10:35:32 +00:00
Martin Stransky
59c99a1b8c Bug 1632059 [Wayland] Use wayland display directly for va-api, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D72122
2020-04-23 16:06:54 +00:00
Martin Stransky
6cfd5ed10f Bug 1629526 [Wayland] Add gWaylandThreadLoopMutex to guard thread loop shutdown, r=jhorak
- Add gWaylandThreadLoopMutex to guard thread loop shutdown
- Rename gWaylandDisplaysMutex to gWaylandDisplayArrayMutex to clarify it's mutex for gWaylandDisplays array access
- Add gWaylandDisplayArrayMutex lock at ReleaseDisplaysAtExit()
- Rename DispatcherThreadLoop names to ThreadLoop

Differential Revision: https://phabricator.services.mozilla.com/D71106

--HG--
extra : moz-landing-system : lando
2020-04-16 06:07:06 +00:00
Bogdan Tara
c53091bec7 Bug 1629526 - Fix whitespace lint on nsWaylandDisplay.cpp CLOSED TREE 2020-04-14 17:42:03 +03:00
Martin Stransky
37e2e6954d Bug 1629526 [Wayland] Use mutex when clear mDispatcherThreadLoop, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D70848

--HG--
extra : moz-landing-system : lando
2020-04-14 13:25:12 +00:00
Martin Stransky
39bcf103db Bug 1625294 [Wayland] Ship testing dmabuf preferences on nightly only, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D68455

--HG--
extra : moz-landing-system : lando
2020-03-27 08:49:47 +00:00
Martin Stransky
c811449120 Bug 1623060 [Wayland] Respect GtkWidget size then committing to wayland surface, r=jhorak
Mutter 3.36 requests exact match of wl_surface/wl_subsurface size so we need to respect
wl_surface size (GtkWidget size) and create a wl_subsurface with the same size.

Differential Revision: https://phabricator.services.mozilla.com/D67137

--HG--
extra : moz-landing-system : lando
2020-03-18 09:43:34 +00:00
Martin Stransky
d2b8e6dd4e Bug 1619530 [Wayland] Don't request zwp_linux_dmabuf to import dmabuf objects, r=jhorak
- Allow to create dmabuf object without zwp_linux_dmabuf extension.
- Don't import GBM dmabuf objects

Differential Revision: https://phabricator.services.mozilla.com/D65500

--HG--
extra : moz-landing-system : lando
2020-03-06 10:40:39 +00:00
Martin Stransky
8416366bd0 Bug 1619907 [Wayland] Provide logging to dmabuf code, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D65307

--HG--
extra : moz-landing-system : lando
2020-03-05 09:19:59 +00:00
Ciure Andrei
4a6e05a3d7 Backed out changeset f96f7b534cbd (bug 1619907) for causing build bustages CLOSED TREE 2020-03-05 11:03:49 +02:00
Martin Stransky
0d15b67122 Bug 1619907 [Wayland] Provide logging to dmabuf code, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D65307

--HG--
extra : moz-landing-system : lando
2020-03-05 08:21:44 +00:00