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
This commit is contained in:
Ray Strode 2015-09-03 13:58:29 -04:00
parent 36eee04a21
commit 0ffd4254d9

View File

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