[mutter] shadow-factory: Don't set implicit Cogl material
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] shadow-factory: Don't set implicit Cogl material
- Date: Tue, 3 Dec 2019 19:15:04 +0000 (UTC)
commit 26147afb08e90d154eac7ad77168a730fc0fd284
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Nov 22 11:36:44 2019 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]