sprinkled some const qualifiers.

2007-10-17  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-render.c (box_filter): sprinkled
	some const qualifiers.


svn path=/trunk/; revision=23862
This commit is contained in:
Sven Neumann 2007-10-17 19:25:01 +00:00 committed by Sven Neumann
parent 3963c27fe4
commit 9f2174fcdf
2 changed files with 22 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2007-10-17 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-render.c (box_filter): sprinkled
some const qualifiers.
2007-10-17 Sven Neumann <sven@gimp.org>
* app/main.c: added back short versions of --gimprc option and

View File

@ -682,22 +682,21 @@ render_image_init_alpha (gint mult)
}
static inline void
box_filter (guint left_weight,
guint center_weight,
guint right_weight,
guint top_weight,
guint middle_weight,
guint bottom_weight,
guint sum,
box_filter (const guint left_weight,
const guint center_weight,
const guint right_weight,
const guint top_weight,
const guint middle_weight,
const guint bottom_weight,
const guint sum,
const guchar **src, /* the 9 surrounding source pixels */
guchar *dest,
gint bpp)
const gint bpp)
{
switch (bpp)
{
gint i;
guint a;
case 4:
#define ALPHA 3
{
@ -714,7 +713,7 @@ box_filter (guint left_weight,
(src[6][ALPHA] * bottom_weight) >> 8
};
a = (center_weight * (factors[0] + factors[1] + factors[2]) +
guint a = (center_weight * (factors[0] + factors[1] + factors[2]) +
right_weight * (factors[3] + factors[4] + factors[5]) +
left_weight * (factors[6] + factors[7] + factors[8]));
@ -760,7 +759,7 @@ box_filter (guint left_weight,
(src[6][ALPHA] * bottom_weight) >> 8
};
a = (center_weight * (factors[0] + factors[1] + factors[2]) +
guint a = (center_weight * (factors[0] + factors[1] + factors[2]) +
right_weight * (factors[3] + factors[4] + factors[5]) +
left_weight * (factors[6] + factors[7] + factors[8]));
@ -1026,12 +1025,14 @@ render_image_tile_fault (RenderInfo *info)
src[5]=src[4];
src[8]=src[7];
}
if (info->src_y + 1 >= source_height)
{
src[6]=src[3];
src[7]=src[4];
src[8]=src[5];
}
box_filter (left_weight, center_weight, right_weight,
top_weight, middle_weight, bottom_weight, info->footarea,
src, dest, bpp);
@ -1475,6 +1476,7 @@ render_image_tile_fault_one_row (RenderInfo *info)
src[5]=src[4];
src[8]=src[7];
}
box_filter (left_weight, center_weight, right_weight,
top_weight, middle_weight, bottom_weight, info->footarea,
src, dest, bpp);