[gnome-shell] st-texture-cache: Remove a no-op scale pixbuf
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-texture-cache: Remove a no-op scale pixbuf
- Date: Thu, 14 Feb 2013 21:41:04 +0000 (UTC)
commit f1cdce38a60d17a3c7b83343a9fbafdf18d72aef
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Feb 14 15:32:02 2013 -0500
st-texture-cache: Remove a no-op scale pixbuf
We already passed GtkIconTheme the size when it wanted to load it,
so it knows the desired size and will scale it to what we want.
https://bugzilla.gnome.org/show_bug.cgi?id=692845
src/st/st-texture-cache.c | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
---
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 7cd4b36..4fd1190 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -246,9 +246,7 @@ impl_load_pixbuf_gicon (GtkIconInfo *info,
StIconColors *colors,
GError **error)
{
- int scaled_width, scaled_height;
GdkPixbuf *pixbuf;
- int width, height;
if (colors)
{
@@ -272,21 +270,6 @@ impl_load_pixbuf_gicon (GtkIconInfo *info,
pixbuf = gtk_icon_info_load_icon (info, error);
}
- if (!pixbuf)
- return NULL;
-
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
-
- if (compute_pixbuf_scale (width,
- height,
- size, size,
- &scaled_width, &scaled_height))
- {
- GdkPixbuf *scaled = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
- g_object_unref (pixbuf);
- pixbuf = scaled;
- }
return pixbuf;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]