[Pkg-cli-apps-commits] [SCM] banshee branch, ubuntu/natty, updated. debian/2.0.0-1ubuntu2-2-gfabdc38

Christopher James Halse Rogers raof at ubuntu.com
Mon Apr 11 08:43:50 UTC 2011


The following commit has been merged in the ubuntu/natty branch:
commit 1427ce52b3e9f9b3b726c39473acfacf9ac424c9
Author: Christopher James Halse Rogers <raof at ubuntu.com>
Date:   Mon Apr 11 18:13:02 2011 +1000

    Cherry-pick CPU-usage reduction patches from stable-2.0

diff --git a/debian/changelog b/debian/changelog
index ad6c081..1fae0a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+banshee (2.0.0-1ubuntu3) natty; urgency=low
+
+  * 11_reduce_cpu_usage.patch:
+    - Cherry pick two commits from the stable-2.0 branch reducing Banshee's
+      CPU use while playing by about 50%.
+
+ -- Christopher James Halse Rogers <raof at ubuntu.com>  Mon, 11 Apr 2011 18:12:29 +1000
+
 banshee (2.0.0-1ubuntu2) natty; urgency=low
 
   * 90_amazon_url.patch:
diff --git a/debian/patches/11_reduce_cpu_usage.patch b/debian/patches/11_reduce_cpu_usage.patch
new file mode 100644
index 0000000..310dc76
--- /dev/null
+++ b/debian/patches/11_reduce_cpu_usage.patch
@@ -0,0 +1,67 @@
+commit cdff2efe25758edc9ce33d0feb62e6e635273e8d
+Author: Gabriel Burt <gabriel.burt at gmail.com>
+Date:   Fri Apr 8 11:42:36 2011 -0500
+
+    StreamPositionLabel: Avoid unnecessary redraws (bgo#647144)
+    
+    Ignore attempts to set the label to its current value.
+
+diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
+index fdb1293..a31a21c 100644
+--- a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
++++ b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
+@@ -174,12 +174,14 @@ namespace Banshee.Widgets
+             }
+         }
+ 
++        private string last_text;
+         private void UpdateLabel (string text)
+         {
+-            if (!IsRealized || layout == null) {
++            if (!IsRealized || layout == null || text == last_text) {
+                 return;
+             }
+ 
++            last_text = text;
+             layout.SetMarkup (String.Format (format_string, GLib.Markup.EscapeText (text)));
+             QueueResize ();
+         }
+
+commit fb9cb9970cb0b35f5bee0d543e6622b4e2dcbcad
+Author: Christopher James Halse Rogers <chrishr at src.gnome.org>
+Date:   Fri Apr 8 16:34:37 2011 +1000
+
+    StreamPositionLabel: Drop unnecessary redraws (bgo#647144)
+    
+    UpdateLabel calls QueueResize, which causes an expose event anyway.
+    
+    Signed-off-by: Gabriel Burt <gabriel.burt at gmail.com>
+
+diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
+index e8e3748..fdb1293 100644
+--- a/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
++++ b/src/Core/Banshee.Widgets/Banshee.Widgets/StreamPositionLabel.cs
+@@ -202,7 +202,6 @@ namespace Banshee.Widgets
+             set {
+                 buffering_progress = Math.Max (0.0, Math.Min (1.0, value));
+                 UpdateLabel ();
+-                QueueDraw ();
+             }
+         }
+ 
+@@ -228,7 +227,6 @@ namespace Banshee.Widgets
+                 if (state != value) {
+                     state = value;
+                     UpdateLabel ();
+-                    QueueDraw ();
+                 }
+             }
+         }
+@@ -239,7 +237,6 @@ namespace Banshee.Widgets
+                 if (is_live != value) {
+                     is_live = value;
+                     UpdateLabel ();
+-                    QueueDraw ();
+                 }
+             }
+         }
diff --git a/debian/patches/series b/debian/patches/series
index 17b98aa..b65f2eb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,6 +11,7 @@
 08_remove_unrelevant_media.patch
 0001-Revert-ArtworkManager-Cache-null-artwork-for-fast-lo.patch
 10_bind-to-loopback-for-daap
+11_reduce_cpu_usage.patch
 90_amazon_url.patch
 91_u1ms-initialize-earlier.patch
 99_ltmain_as-needed.patch

-- 
banshee



More information about the Pkg-cli-apps-commits mailing list