comparison audacious/util.c @ 1852:01103f911aa5 trunk

[svn] - avoid unnecessary resizing
author nenolod
date Mon, 09 Oct 2006 03:50:11 -0700
parents aceb472cce6c
children 94795106c541
comparison
equal deleted inserted replaced
1851:aceb472cce6c 1852:01103f911aa5
1556 g_return_if_fail(in != NULL); 1556 g_return_if_fail(in != NULL);
1557 g_return_if_fail(width > 0 && height > 0); 1557 g_return_if_fail(width > 0 && height > 0);
1558 1558
1559 gdk_drawable_get_size(in, &owidth, &oheight); 1559 gdk_drawable_get_size(in, &owidth, &oheight);
1560 1560
1561 if (oheight == height && owidth == width)
1562 return;
1563
1561 out = gdk_pixmap_new(src, width, height, -1); 1564 out = gdk_pixmap_new(src, width, height, -1);
1562 1565
1563 gdk_draw_rectangle(out, src_gc, TRUE, 0, 0, width, height); 1566 gdk_draw_rectangle(out, src_gc, TRUE, 0, 0, width, height);
1564 1567
1565 gdk_window_copy_area(out, src_gc, 0, 0, in, 0, 0, owidth, oheight); 1568 gdk_window_copy_area(out, src_gc, 0, 0, in, 0, 0, owidth, oheight);