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
This commit is contained in:
Jonas Ådahl 2019-11-22 11:36:44 +01:00 committed by Georges Basile Stavracas Neto
parent fd0ce66ac1
commit 26147afb08

View File

@ -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