From 26147afb08e90d154eac7ad77168a730fc0fd284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 22 Nov 2019 11:36:44 +0100 Subject: [PATCH] shadow-factory: Don't set implicit Cogl material We only draw with non-deprecated API already, so there is no reason to set the source material. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935 --- src/compositor/meta-shadow-factory.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-shadow-factory.c index ee94e2b4c..c4228fa37 100644 --- a/src/compositor/meta-shadow-factory.c +++ b/src/compositor/meta-shadow-factory.c @@ -216,11 +216,13 @@ meta_shadow_paint (MetaShadow *shadow, int dest_x[4]; int dest_y[4]; int n_x, n_y; - gboolean source_updated = FALSE; if (clip && cairo_region_is_empty (clip)) return; + cogl_pipeline_set_color4ub (shadow->pipeline, + opacity, opacity, opacity, opacity); + if (shadow->scale_width) { n_x = 3; @@ -298,14 +300,6 @@ meta_shadow_paint (MetaShadow *shadow, if (overlap == CAIRO_REGION_OVERLAP_OUT) continue; - if (!source_updated) - { - cogl_pipeline_set_color4ub (shadow->pipeline, - opacity, opacity, opacity, opacity); - cogl_set_source (shadow->pipeline); - source_updated = TRUE; - } - /* There's quite a bit of overhead from allocating a new * region in order to find an exact intersection and * generating more geometry - we make the assumption that