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
This commit is contained in:
Jasper St. Pierre 2013-02-14 15:32:02 -05:00
parent 65e4652142
commit f1cdce38a6

View File

@ -246,9 +246,7 @@ impl_load_pixbuf_gicon (GtkIconInfo *info,
StIconColors *colors, StIconColors *colors,
GError **error) GError **error)
{ {
int scaled_width, scaled_height;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
int width, height;
if (colors) if (colors)
{ {
@ -272,21 +270,6 @@ impl_load_pixbuf_gicon (GtkIconInfo *info,
pixbuf = gtk_icon_info_load_icon (info, error); 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; return pixbuf;
} }