From 123f4df31b85e00841e31eb38fa859562130de55 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Wed, 5 Nov 2008 11:48:07 +0000 Subject: [PATCH] Add support for setting MUTTER_DISABLE_MIPMAPS env var. --- src/compositor/mutter/README | 10 ++++++++++ src/compositor/mutter/compositor-mutter.c | 12 ++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/compositor/mutter/README diff --git a/src/compositor/mutter/README b/src/compositor/mutter/README new file mode 100644 index 000000000..b6308f69f --- /dev/null +++ b/src/compositor/mutter/README @@ -0,0 +1,10 @@ +Intro +===== + +Fix me. + + +Env Vars +======== + +MUTTER_DISABLE_MIPMAPS - set to disable use of mipmaped windows. \ No newline at end of file diff --git a/src/compositor/mutter/compositor-mutter.c b/src/compositor/mutter/compositor-mutter.c index 752d82437..4967819ba 100644 --- a/src/compositor/mutter/compositor-mutter.c +++ b/src/compositor/mutter/compositor-mutter.c @@ -135,6 +135,7 @@ typedef struct _Mutter gboolean show_redraw : 1; gboolean debug : 1; + gboolean no_mipmaps : 1; } Mutter; typedef struct _MetaCompScreen @@ -1353,6 +1354,7 @@ repair_win (MutterWindow *cw) MetaDisplay *display = meta_screen_get_display (screen); Display *xdisplay = meta_display_get_xdisplay (display); MetaCompScreen *info = meta_screen_get_compositor_data (screen); + Mutter *compositor; Window xwindow = priv->xwindow; gboolean full = FALSE; @@ -1360,6 +1362,8 @@ repair_win (MutterWindow *cw) xwindow == clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage))) return; + compositor = (Mutter*)meta_display_get_compositor (display); + meta_error_trap_push (display); if (priv->back_pixmap == None) @@ -1393,8 +1397,9 @@ repair_win (MutterWindow *cw) * seemingly caused by cogl_texture_set_filters() in set_filter * Not sure if that call is actually needed. */ - clutter_texture_set_filter_quality (CLUTTER_TEXTURE (priv->actor), - CLUTTER_TEXTURE_QUALITY_HIGH ); + if (!compositor->no_mipmaps) + clutter_texture_set_filter_quality (CLUTTER_TEXTURE (priv->actor), + CLUTTER_TEXTURE_QUALITY_HIGH ); clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor), @@ -2474,6 +2479,9 @@ mutter_new (MetaDisplay *display) clc->display = display; + if (g_getenv("MUTTER_DISABLE_MIPMAPS")) + clc->no_mipmaps = TRUE; + meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names)); XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names), False, atoms);