oops - managed to miss the mask rendering.

2007-09-23  Simon Budig  <simon@gimp.org>

	* app/display/gimpdisplayshell-render.c: oops - managed to miss the
	mask rendering.


svn path=/trunk/; revision=23619
This commit is contained in:
Simon Budig
2007-09-23 00:57:15 +00:00
committed by Simon Budig
parent 7d0a4ce1ec
commit a26c1d7df9
2 changed files with 46 additions and 59 deletions

View File

@ -1,3 +1,8 @@
2007-09-23 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell-render.c: oops - managed to miss the
mask rendering.
2007-09-23 Simon Budig <simon@gimp.org> 2007-09-23 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell-render.c: use Bresenham stepping * app/display/gimpdisplayshell-render.c: use Bresenham stepping

View File

@ -89,7 +89,6 @@ struct _RenderInfo
gint dy_start; gint dy_start;
gint dy; gint dy;
gint yfraction;
}; };
static void gimp_display_shell_render_info_scale (RenderInfo *info, static void gimp_display_shell_render_info_scale (RenderInfo *info,
@ -395,7 +394,6 @@ gimp_display_shell_render_mask (GimpDisplayShell *shell,
{ {
gint y, ye; gint y, ye;
gint x, xe; gint x, xe;
gboolean initial = TRUE;
y = info->y; y = info->y;
ye = info->y + info->h; ye = info->y + info->h;
@ -405,14 +403,6 @@ gimp_display_shell_render_mask (GimpDisplayShell *shell,
info->src = render_image_tile_fault (info); info->src = render_image_tile_fault (info);
while (TRUE) while (TRUE)
{
gint error = floor ((y + 1) / info->scaley) - floor (y / info->scaley);
if (!initial && (error == 0))
{
memcpy (info->dest, info->dest - info->dest_bpl, info->dest_width);
}
else
{ {
const guchar *src = info->src; const guchar *src = info->src;
guchar *dest = info->dest; guchar *dest = info->dest;
@ -455,25 +445,17 @@ gimp_display_shell_render_mask (GimpDisplayShell *shell,
default: default:
break; break;
} }
}
if (++y == ye) if (++y == ye)
break; break;
info->dest += info->dest_bpl; info->dest += info->dest_bpl;
if (error) info->dy += info->y_dest_inc;
{ info->src_y += info->dy / info->y_src_dec;
info->src_y += error; info->dy = info->dy % info->y_src_dec;
info->yfraction = 256 * fmod (y / info->scaley, 1.0);
info->src = render_image_tile_fault (info);
initial = TRUE; info->src = render_image_tile_fault (info);
}
else
{
initial = FALSE;
}
} }
} }