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