[mutter] clutter/stage-view: Disable double buffered shadow buffering
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage-view: Disable double buffered shadow buffering
- Date: Mon, 8 Mar 2021 11:33:19 +0000 (UTC)
commit 393a85971c477419e0c16cf66c349d83651aa223
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Feb 10 09:39:18 2021 +0100
clutter/stage-view: Disable double buffered shadow buffering
To make the double buffered shadow buffer damaged tiles detection
feasable, a new EGL extension is needed for creating FBO's backed by
a custom CPU memory buffer, instead of DMA buffers, as DMA buffers can
be very slow to read, much slower than just painting the shadow buffer
directly.
Leave the code there, since such an EGL extension is intended to be
added, but hide it behind an env var so that it isn't enabled by
accident.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1724>
clutter/clutter/clutter-stage-view.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c
index a9d77e44a0..9b325e911c 100644
--- a/clutter/clutter/clutter-stage-view.c
+++ b/clutter/clutter/clutter-stage-view.c
@@ -425,15 +425,19 @@ init_shadowfb (ClutterStageView *view)
height = cogl_framebuffer_get_height (priv->framebuffer);
cogl_context = cogl_framebuffer_get_context (priv->framebuffer);
- if (init_dma_buf_shadowfbs (view, cogl_context, width, height, &error))
+ if (g_strcmp0 (g_getenv ("MUTTER_DEBUG_ENABLE_DOUBLE_SHADOWFB"), "1") == 0)
{
- g_message ("Initialized double buffered shadow fb for %s", priv->name);
- return;
- }
+ if (init_dma_buf_shadowfbs (view, cogl_context, width, height, &error))
+ {
+ g_message ("Initialized double buffered shadow fb for %s",
+ priv->name);
+ return;
+ }
- g_warning ("Failed to initialize double buffered shadow fb for %s: %s",
- priv->name, error->message);
- g_clear_error (&error);
+ g_warning ("Failed to initialize double buffered shadow fb for %s: %s",
+ priv->name, error->message);
+ g_clear_error (&error);
+ }
if (!init_fallback_shadowfb (view, cogl_context, width, height, &error))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]