aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:27:27 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:27:27 +0800
commitcaef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba (patch)
tree77bd92243320480d2de94481ab00ffad4f73b1b4
parent0518ac47b6255f6d8424663cd3d2bf1500e2f05c (diff)
downloadgsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar.gz
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar.bz2
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar.lz
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar.xz
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.tar.zst
gsoc2013-empathy-caef4dd5f3ba9e43a0ec8f364ae9a0662cd001ba.zip
AvatarChooser: clarify why _scale_down_if_necessary is cheap.
svn path=/trunk/; revision=1698
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 31c7adca8..af6a82ef0 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -448,8 +448,13 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser,
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));