avoided some redundant calculations.

2004-06-10  Philip Lafleur  <plafleur@cvs.gnome.org>

	* app/paint/gimpbrushcore.c (gimp_brush_core_pressurize_mask):
	avoided some redundant calculations.
This commit is contained in:
Philip Lafleur 2004-06-10 02:53:19 +00:00 committed by Philip Lafleur
parent 309bf0098f
commit abcf984b66
2 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2004-06-10 Philip Lafleur <plafleur@cvs.gnome.org>
* app/paint/gimpbrushcore.c (gimp_brush_core_pressurize_mask):
avoided some redundant calculations.
2004-06-10 Sven Neumann <sven@gimp.org>
* app/gui/user-install-dialog.c: removed the monitor calibration

View File

@ -1057,15 +1057,22 @@ gimp_brush_core_pressurize_mask (GimpBrushCore *core,
}
#else /* ! FANCY_PRESSURE */
for (i = 0; i < 256; i++)
{
gint tmp = (pressure / 0.5) * i;
{
gdouble j, k;
if (tmp > 255)
mapi[i] = 255;
else
mapi[i] = tmp;
}
j = pressure + pressure;
k = 0;
for (i = 0; i < 256; i++)
{
if (k > 255)
mapi[i] = 255;
else
mapi[i] = (guchar) k;
k += j;
}
}
#endif /* FANCY_PRESSURE */