changeset 1852:01103f911aa5 trunk

[svn] - avoid unnecessary resizing
author nenolod
date Mon, 09 Oct 2006 03:50:11 -0700
parents aceb472cce6c
children 1c19a0dca33d
files ChangeLog audacious/util.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 09 03:44:50 2006 -0700
+++ b/ChangeLog	Mon Oct 09 03:50:11 2006 -0700
@@ -1,3 +1,13 @@
+2006-10-09 10:44:50 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2659]
+  - add audacious_pixmap_resize() for resizing a skin pixmap on demand.
+  
+  trunk/audacious/mainwin.c |    4 ++++
+  trunk/audacious/util.c    |   25 +++++++++++++++++++++++++
+  trunk/audacious/util.h    |    2 ++
+  3 files changed, 31 insertions(+)
+
+
 2006-10-09 10:20:36 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2657]
   - the default for mainwinTextVisible() should be FALSE.
--- a/audacious/util.c	Mon Oct 09 03:44:50 2006 -0700
+++ b/audacious/util.c	Mon Oct 09 03:50:11 2006 -0700
@@ -1558,6 +1558,9 @@
 
 	gdk_drawable_get_size(in, &owidth, &oheight);
 
+	if (oheight == height && owidth == width)
+		return;
+
 	out = gdk_pixmap_new(src, width, height, -1);
 
 	gdk_draw_rectangle(out, src_gc, TRUE, 0, 0, width, height);