[Pkg-wmaker-commits] [wmbubble] 83/207: Fix cpu squandering if picture_lock at fully opaque graph.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbubble.

commit 3005b128dd70a9e6b612e1cbd8a671def2aebb0a
Author: Robert Jacobs <rnjacobs at mit.edu>
Date:   Thu Aug 18 16:45:12 2011 -0700

    Fix cpu squandering if picture_lock at fully opaque graph.
---
 bubblemon.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/bubblemon.c b/bubblemon.c
index 166e53a..020f99c 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -1201,13 +1201,12 @@ void calculate_transparencies(int proximity) {
 		gauge_alpha -= gauge_rate;
 		if (gauge_alpha < CPUMINBLEND) {
 			gauge_alpha = CPUMINBLEND;
-			if (memscreen_enabled) {
+			if (memscreen_enabled && !bm.picture_lock) {
 				if (graph_alpha == GRAPHMAXBLEND) {
-					/* first time here, update memory stats */
+					/* make sure there's never a stale picture when we first go non-opaque */
 					render_secondary();
 				}
-				if (!bm.picture_lock)
-					graph_alpha -= graph_transparent_rate;
+				graph_alpha -= graph_transparent_rate;
 				if (graph_alpha < GRAPHMINBLEND) {
 					graph_alpha = GRAPHMINBLEND;
 				}
@@ -1215,13 +1214,14 @@ void calculate_transparencies(int proximity) {
 		}
 	} else {
 		gauge_alpha += gauge_rate;
-		if (memscreen_enabled && !bm.picture_lock)
-			graph_alpha += graph_opaque_rate;
 		if (gauge_alpha > CPUMAXBLEND) {
 			gauge_alpha = CPUMAXBLEND;
 		}
-		if (memscreen_enabled && graph_alpha > GRAPHMAXBLEND) {
-			graph_alpha = GRAPHMAXBLEND;
+		if (memscreen_enabled && !bm.picture_lock) {
+			graph_alpha += graph_opaque_rate;
+			if (memscreen_enabled && graph_alpha > GRAPHMAXBLEND) {
+				graph_alpha = GRAPHMAXBLEND;
+			}
 		}
 	}
 } /* calculate_transparencies */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git



More information about the Pkg-wmaker-commits mailing list