[mutter] MetaBackgroundActor: match total dimming if GLSL is not present
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaBackgroundActor: match total dimming if GLSL is not present
- Date: Wed, 3 Sep 2014 17:45:39 +0000 (UTC)
commit ef3b0000508d30e15aaee6c7ee9ae58275246062
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Sep 2 18:09:29 2014 -0400
MetaBackgroundActor: match total dimming if GLSL is not present
Without GLSL, we didn't apply the vignetting, which not only made the
background uniform in color, it made it much lighter. Adjust for this
and make the average brightness with the vignette effect the same
with or without GLSL.
https://bugzilla.gnome.org/show_bug.cgi?id=735637
src/compositor/meta-background-actor.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c
index ad82f20..4423b14 100644
--- a/src/compositor/meta-background-actor.c
+++ b/src/compositor/meta-background-actor.c
@@ -319,7 +319,18 @@ setup_pipeline (MetaBackgroundActor *self,
}
if (priv->vignette)
- color_component = priv->brightness * opacity / 255.;
+ {
+ color_component = priv->brightness * opacity / 255.;
+
+ if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
+ {
+ /* Darken everything to match the average brightness that would
+ * be there if we were drawing the vignette, which is
+ * (1 - (pi/12.) * vignette_sharpness [exercise for the reader :]
+ */
+ color_component *= (1 - 0.74 * priv->vignette_sharpness);
+ }
+ }
else
color_component = opacity / 255.;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]