From b27c726a58ec8553acf47b3751cefab1c015fd0b Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 13 Jun 2002 22:12:53 +0000 Subject: [PATCH] Fix problem where when no alpha was involved, we scaled rather than Thu Jun 13 18:11:11 2002 Owen Taylor * pixops/pixops.c: Fix problem where when no alpha was involved, we scaled rather than composited, but then went ahead and composited anyways. (#76958, Patch from Matthias Clasen). Needs to be merged to GNOME 1.4 gdk-pixbuf --- gdk-pixbuf/pixops/pixops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c index 57c48d3906..1a6c06118f 100644 --- a/gdk-pixbuf/pixops/pixops.c +++ b/gdk-pixbuf/pixops/pixops.c @@ -1429,10 +1429,13 @@ pixops_composite_color (guchar *dest_buf, return; if (!src_has_alpha && overall_alpha == 255) + { pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, dest_rowstride, dest_channels, dest_has_alpha, src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, scale_x, scale_y, interp_type); + return; + } switch (interp_type) { @@ -1480,7 +1483,7 @@ pixops_composite_color (guchar *dest_buf, * @render_x0: x0 of region of scaled source to store into @dest_buf * @render_y0: y0 of region of scaled source to store into @dest_buf * @render_x1: x1 of region of scaled source to store into @dest_buf - * @render_y1: x1 of region of scaled source to store into @dest_buf + * @render_y1: y1 of region of scaled source to store into @dest_buf * @dest_rowstride: rowstride of @dest_buf * @dest_channels: number of channels in @dest_buf * @dest_has_alpha: whether @dest_buf has alpha @@ -1532,10 +1535,13 @@ pixops_composite (guchar *dest_buf, return; if (!src_has_alpha && overall_alpha == 255) + { pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, dest_rowstride, dest_channels, dest_has_alpha, src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, scale_x, scale_y, interp_type); + return; + } switch (interp_type) {