Blame SOURCES/0001-clutter-stage-view-Hide-double-buffered-shadowfb-beh.patch

0e33ea
From 7bcc274dbc6cb75814cce3e5c2e7f45cf25b0538 Mon Sep 17 00:00:00 2001
0e33ea
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
0e33ea
Date: Tue, 9 Feb 2021 17:59:08 +0100
0e33ea
Subject: [PATCH 1/2] clutter/stage-view: Hide double buffered shadowfb behind
0e33ea
 envvar
0e33ea
0e33ea
It still results in worse performance than a single FBO based shadowfb,
0e33ea
so don't use it. It will need a new EGL extension for zero copy CPU
0e33ea
memory based FBO to be feasable.
0e33ea
---
0e33ea
 clutter/clutter/clutter-stage-view.c | 12 ++++++++++--
0e33ea
 1 file changed, 10 insertions(+), 2 deletions(-)
0e33ea
0e33ea
diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c
0e33ea
index 5e5966d06..ec18db7b8 100644
0e33ea
--- a/clutter/clutter/clutter-stage-view.c
0e33ea
+++ b/clutter/clutter/clutter-stage-view.c
0e33ea
@@ -282,6 +282,14 @@ init_dma_buf_shadowfbs (ClutterStageView  *view,
0e33ea
   CoglRenderer *cogl_renderer = cogl_context_get_renderer (cogl_context);
0e33ea
   CoglFramebuffer *initial_shadowfb;
0e33ea
 
0e33ea
+  if (g_strcmp0 (g_getenv ("MUTTER_DEBUG_ENABLE_DOUBLE_BUFFER_SHADOWFB"),
0e33ea
+                 "1") != 0)
0e33ea
+    {
0e33ea
+      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
0e33ea
+                   "Double buffered shadowfb not enabled");
0e33ea
+      return FALSE;
0e33ea
+    }
0e33ea
+
0e33ea
   if (!cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE))
0e33ea
     {
0e33ea
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
0e33ea
@@ -390,8 +398,8 @@ init_shadowfb (ClutterStageView *view)
0e33ea
       return;
0e33ea
     }
0e33ea
 
0e33ea
-  g_warning ("Failed to initialize double buffered shadow fb for %s: %s",
0e33ea
-             priv->name, error->message);
0e33ea
+  g_debug ("Failed to initialize double buffered shadow fb for %s: %s",
0e33ea
+           priv->name, error->message);
0e33ea
   g_clear_error (&error);
0e33ea
 
0e33ea
   if (!init_fallback_shadowfb (view, cogl_context, width, height, &error))
0e33ea
-- 
0e33ea
2.29.2
0e33ea