empathy r1698 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1698 - trunk/libempathy-gtk
- Date: Tue, 11 Nov 2008 15:27:28 +0000 (UTC)
Author: xclaesse
Date: Tue Nov 11 15:27:27 2008
New Revision: 1698
URL: http://svn.gnome.org/viewvc/empathy?rev=1698&view=rev
Log:
AvatarChooser: clarify why _scale_down_if_necessary is cheap.
Modified:
trunk/libempathy-gtk/empathy-avatar-chooser.c
Modified: trunk/libempathy-gtk/empathy-avatar-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-avatar-chooser.c (original)
+++ trunk/libempathy-gtk/empathy-avatar-chooser.c Tue Nov 11 15:27:27 2008
@@ -448,8 +448,13 @@
needs_conversion = TRUE;
}
- /* If scaling down the pixbuf to fit the dimensions yields a new
- * pixbuf, then it needed scaling. if it's the same pixbuf, it did not.
+ /* If _scale_down_if_necessary yields a new pixbuf, then it needed
+ * scaling. If it's the same pixbuf, it did not, and did no extra work
+ * beyond checking the dimensions. Hence, we call it even if
+ * needs_conversion is already TRUE, rather than duplicating the
+ * dimension checking code here, as it's no more expensive than
+ * checking the dimensions first in the case where no scaling is
+ * necessary.
*/
pixbuf_scaled = empathy_pixbuf_scale_down_if_necessary (pixbuf,
MIN(max_width, max_height));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]