banshee r4663 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4663 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Mon, 6 Oct 2008 21:32:57 +0000 (UTC)
Author: abock
Date: Mon Oct 6 21:32:56 2008
New Revision: 4663
URL: http://svn.gnome.org/viewvc/banshee?rev=4663&view=rev
Log:
2008-10-06 Aaron Bockover <abock gnome org>
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs:
Do not re-create the layout on every expose; this fixes a pretty bad leak
and possibly speeds up rendering
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs Mon Oct 6 21:32:56 2008
@@ -71,6 +71,11 @@
// Save the drawable so we can reuse it
Gdk.Drawable drawable = cell_context != null ? cell_context.Drawable : null;
+
+ if (pango_layout != null) {
+ pango_layout.Dispose ();
+ pango_layout = null;
+ }
cell_context = new CellContext ();
cell_context.Theme = theme;
@@ -86,7 +91,9 @@
}
cairo_context = CairoHelper.Create (evnt.Window);
- CairoExtensions.CreateLayout (this, cairo_context, ref pango_layout);
+ if (pango_layout == null) {
+ CairoExtensions.CreateLayout (this, cairo_context, ref pango_layout);
+ }
cell_context.Context = cairo_context;
cell_context.Layout = pango_layout;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]