[mutter] background: Shrink wallpaper using LINEAR_MIPMAP_LINEAR



commit d15e11bfe74c773f313be6b69f2d692077ff8be2
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Mon Mar 25 11:27:38 2019 +0800

    background: Shrink wallpaper using LINEAR_MIPMAP_LINEAR
    
    Commit 8e9184b6 added filtering to avoid image jaggies when downscaling
    but used `LINEAR_MIPMAP_NEAREST`. In some situations this could lead to
    GL choosing a single lower resolution mipmap and then upscaling it, hence
    slightly blurry.
    
    We don't want to revert that change since it avoids aliasing jaggies, so
    let's use `LINEAR_MIPMAP_LINEAR` instead. This provides the highest quality
    filtering that GL can do and avoids the situation of GL using a single
    mipmap that's lower resolution than the screen. Now it will blend that one
    with the next mipmap which is higher resolution than the screen. This still
    avoids jaggies but also maintains 1px resolution.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1105
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/505

 src/compositor/meta-background.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index 6dd4242d2..c033395fe 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -615,7 +615,7 @@ create_pipeline (PipelineType type)
 
   cogl_pipeline_set_layer_filters (templates[type],
                                    0,
-                                   COGL_PIPELINE_FILTER_LINEAR_MIPMAP_NEAREST,
+                                   COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR,
                                    COGL_PIPELINE_FILTER_LINEAR);
 
   return cogl_pipeline_copy (templates[type]);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]