[mutter/gnome-40] shaped-texture: Do not apply y-inverts to shape masks



commit 2a5ea67a4765a74db010bcd30aab7f5180a04aee
Author: Robert Mader <robert mader posteo de>
Date:   Tue Jul 20 13:02:38 2021 +0200

    shaped-texture: Do not apply y-inverts to shape masks
    
    This was introduced by accident in commit 1467b6b02a73bca76
    
    y-inverted textures in combination with shape masks appear to
    be only commonly used with EGLstreams. However, as we draw the
    shape mask ourselves, we don't want to apply the y-invert to it
    as testified by the left over `cogl_pipeline_set_layer_matrix()`.
    
    Note that we still allow to apply viemports and buffer transforms,
    as the Xwayland mode setting emulation may use it (in fact only
    the former, but it probably does not hurt to leave the later as well).
    
    Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1792
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1937>

 src/compositor/meta-shaped-texture.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 6a8af828f0..f237d82dd9 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -368,15 +368,15 @@ get_base_pipeline (MetaShapedTexture *stex,
                                  &GRAPHENE_POINT3D_INIT (0.5, 0.5, 0.0));
     }
 
+  cogl_pipeline_set_layer_matrix (pipeline, 1, &matrix);
+
   if (!stex->is_y_inverted)
     {
       graphene_matrix_translate (&matrix, &GRAPHENE_POINT3D_INIT (0, -1, 0));
       graphene_matrix_scale (&matrix, 1, -1, 1);
-      cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);
     }
 
   cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);
-  cogl_pipeline_set_layer_matrix (pipeline, 1, &matrix);
 
   if (stex->snippet)
     cogl_pipeline_add_layer_snippet (pipeline, 0, stex->snippet);


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