summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backends/meta-settings-private.h1
-rw-r--r--src/backends/meta-settings.c2
-rw-r--r--src/backends/native/meta-backend-native.c5
3 files changed, 8 insertions, 0 deletions
diff --git a/src/backends/meta-settings-private.h b/src/backends/meta-settings-private.h
index 91b3eb17a..c0621cb08 100644
--- a/src/backends/meta-settings-private.h
+++ b/src/backends/meta-settings-private.h
@@ -35,6 +35,7 @@ typedef enum _MetaExperimentalFeature
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2),
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND = (1 << 3),
+ META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING = (1 << 4),
} MetaExperimentalFeature;
typedef enum _MetaXwaylandExtension
diff --git a/src/backends/meta-settings.c b/src/backends/meta-settings.c
index f14dbfae6..553e2cd1c 100644
--- a/src/backends/meta-settings.c
+++ b/src/backends/meta-settings.c
@@ -273,6 +273,8 @@ experimental_features_handler (GVariant *features_variant,
feature = META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
else if (g_str_equal (feature_str, "autostart-xwayland"))
feature = META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND;
+ else if (g_str_equal (feature_str, "dma-buf-screen-sharing"))
+ feature = META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING;
if (feature)
g_message ("Enabling experimental feature '%s'", feature_str);
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index 1b7c8e058..73723ace9 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -347,6 +347,7 @@ static void
maybe_disable_screen_cast_dma_bufs (MetaBackendNative *native)
{
MetaBackend *backend = META_BACKEND (native);
+ MetaSettings *settings = meta_backend_get_settings (backend);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
MetaScreenCast *screen_cast = meta_backend_get_screen_cast (backend);
@@ -365,6 +366,10 @@ maybe_disable_screen_cast_dma_bufs (MetaBackendNative *native)
if (g_strv_contains (enable_dma_buf_drivers, driver_name))
return;
+ if (meta_settings_is_experimental_feature_enabled (settings,
+ META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING))
+ return;
+
g_message ("Disabling DMA buffer screen sharing for driver '%s'.",
driver_name);