From 0ffd4254d9d226f14655a9ef9a459afe1cf36fe7 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 3 Sep 2015 13:58:29 -0400 Subject: [PATCH] background: simplify conditional in meta_background_get_texture meta_background_get_texture only draws the bottom image texture if 1) the blend factor leaves the top image translucent or 2) the top image is translucent from alpha The latter case doesn't actually matter since we're using REPLACE on the top image texture. This commit drops the unnecessary check for the second case and applies demorgans law to the conditional for clarity. https://bugzilla.gnome.org/show_bug.cgi?id=754476 --- src/compositor/meta-background.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c index 3f2e23f44..0db6698bc 100644 --- a/src/compositor/meta-background.c +++ b/src/compositor/meta-background.c @@ -796,8 +796,7 @@ meta_background_get_texture (MetaBackground *self, 0.0, 0.0, 0.0, 0.0); } - if (texture1 != NULL && - !(texture2 != NULL && priv->blend_factor == 1.0 && !texture_has_alpha (texture2))) + if (texture1 != NULL && priv->blend_factor != 1.0) { CoglPipeline *pipeline = create_pipeline (PIPELINE_ADD); cogl_pipeline_set_color4f (pipeline,