backend/native: Only disable dmabuf screen cast when not hw accelerated

We now only enable DMA buffer based PipeWire screen casting if a
format/modifier has been negotiated. This practically means a consumer
is aware about what is needed, and we should not try to predict that it
uses the DMA buffer the right way (i.e. not mmap:ing directly).

However, in case we're not hardware accelerated, we never want to
attempt to use DMA buffer screen sharing, as we want to avoid
compositing into a DMA buffer on such hardware as doing so can be very
slow.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2086>
This commit is contained in:
Jonas Ådahl
2021-11-11 09:28:25 +01:00
committed by Marge Bot
parent 169dd2fb7a
commit 52ce81657d
4 changed files with 6 additions and 40 deletions

View File

@ -294,8 +294,6 @@ experimental_features_handler (GVariant *features_variant,
feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
else if (g_str_equal (feature_str, "rt-scheduler"))
feature = META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
else if (g_str_equal (feature_str, "dma-buf-screen-sharing"))
feature = META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING;
else if (g_str_equal (feature_str, "autoclose-xwayland"))
feature = META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND;