diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-05-10 19:24:48 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-05-10 19:24:48 +0000 |
commit | d43501f3e9dc8038a5e07348ed0447000901acf0 (patch) | |
tree | 3aacfdf89882b2ee57f3d0630990b7074831d7fc | |
parent | 73425733306b12fe84396a2b0354a91b85a0f194 (diff) | |
download | gdk-pixbuf-d43501f3e9dc8038a5e07348ed0447000901acf0.tar.gz |
Don't call into the backend if the region is empty. (#437081, Sven
2007-05-10 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkdraw.c (gdk_draw_pixbuf): Don't call into
the backend if the region is empty. (#437081, Sven Neumann)
svn path=/branches/gtk-2-10/; revision=17814
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gdk/gdkdraw.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-05-10 Matthias Clasen <mclasen@redhat.com> + + * gdk/gdkdraw.c (gdk_draw_pixbuf): Don't call into + the backend if the region is empty. (#437081, Sven Neumann) + 2007-05-09 Dom Lachowicz <domlachowicz@gmail.com> Merge from trunk: diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index 6905d510b..5b72dd75a 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -751,13 +751,17 @@ gdk_draw_pixbuf (GdkDrawable *drawable, g_return_if_fail (gc == NULL || GDK_IS_GC (gc)); g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); + if (width == 0 || height == 0) + return; + if (width == -1) width = gdk_pixbuf_get_width (pixbuf); if (height == -1) height = gdk_pixbuf_get_height (pixbuf); GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc, pixbuf, - src_x, src_y, dest_x, dest_y, width, height, + src_x, src_y, dest_x, dest_y, + width, height, dither, x_dither, y_dither); } |