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

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