Make the surface and subsurface code handle the dmabuf feedback,
and update the :dmabuf-formats property on the surface to reflect
the Wayland dmabuf information.
Keep the dmabuf formats from the default feedback events around
in the display, instead of just printing out debug spew.
The formats will be used in the future.
Add a property to GdkSurface that carries the effective dmabuf
formats for the surface. This will be either the formats according
to the surfaces own Wayland dmabuf feedback, or the formats of the
topmost subsurface.
Add device and scanout information for dmabuf formats.
While this is not a great API, there is no good alternative to
making this information available to applications that want to
negotiate dmabuf formats suitable for graphics offload.
The getters for Wayland-specific information are kept as
Wayland backend apis.
Tests included.
Arrange for the following tranches to be collected With GL:
- Regular EGL formats
- Mmap formats (that aren't included already
And with GLES:
- Regular EGL formats
- External EGL formats
- Mmap formats (that aren't included already
Also, move the debug spew for formats from the downloaders to the
display, so we can print them properly sorted, and in their tranches.
The only thing we don't have anymore here is the downloader name.
Use a format of
[XXX] SYMBOL DETAILS
where SYMBOL indicates the offloading status:
🗙 - no offload
▲ - offload above, with background
△ - offload above, no background
▼ - offload below, with background
▽ - offload below, no background
The VK_IMAGE_LAYOUT_UNDEFINED layout means that the data hold by the
texture can be discarded, and we don't want to discard it. Because the
Vulkan spec is unclear (see [1] for a discussion), err on the side of
caution and use VK_IMAGE_LAYOUT_GENERAL.
Fixes import failures with WebKit.
[1] https://github.com/ValveSoftware/gamescope/issues/356
Visual Studio (and possibly other non-GCC compilers) do not like
uses of #-preprocessor directives in macro usage (warning C5101: use of
preprocessor directive in function-like macro argument list is undefined
behavior is also shown), so fix the build by defining another macro
accordingly.
Popping an event of the queue in the IMContext handler
prevents it from being forwarded to the NSApp, in case the
(key) event was not handled by IMContext.
So I reverted to a mix of the original (4.13) and new (4.14.1) behavior
for fetching events: NSEvent lookup for IMContext uses loose matching,
so it can work with rewritten events. When sending events to NSApp, only
we're checking for an exact match.
Now in-app keyboard shortcuts (e.g. Ctrl-F2) work from within text
fields again.
We prefer it over the old DESKTOP_STARTUP_ID environment variable if we
have it and it is valid.
We have to stash and unset XDG_ACTIVATION_TOKEN in addition to
DESKTOP_STARTUP_ID now as well. This makes sure that we don't call any
library functions which might rely on some environment variables. This
way unsetting the environment variables is safe and we can then
afterwards validate and print warnings.