Commit 7ccdcd62 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

moved declarations at the beginning of the functions.

2006-08-31  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-mmx.c: moved declarations at the
	beginning of the functions.

	* app/tools/gimptransformtool.c (gimp_transform_tool_doit):
	display a message if no paths are available. Could catch this
	earlier, but this is the least intrusive change to fix bug #353495.
parent d5b605dc
2006-08-31 Sven Neumann <sven@gimp.org>
* app/composite/gimp-composite-mmx.c: moved declarations at the
beginning of the functions.
* app/tools/gimptransformtool.c (gimp_transform_tool_doit):
display a message if no paths are available. Could catch this
earlier, but this is the least intrusive change to fix bug #353495.
2006-08-30 Sven Neumann <sven@gimp.org>
* plug-ins/common/gif.c: similar cleanup, removed unused parameters.
......
......@@ -1294,6 +1294,12 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
uint64 *d = (uint64 *) _op->D;
uint64 *a = (uint64 *) _op->A;
uint64 *b = (uint64 *) _op->B;
uint32 *a32;
uint32 *b32;
uint32 *d32;
uint16 *a16;
uint16 *b16;
uint16 *d16;
gulong n_pixels = _op->n_pixels;
asm volatile ("movq %0,%%mm0"
......@@ -1321,9 +1327,9 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
d++;
}
uint32 *a32 = (uint32 *) a;
uint32 *b32 = (uint32 *) b;
uint32 *d32 = (uint32 *) d;
a32 = (uint32 *) a;
b32 = (uint32 *) b;
d32 = (uint32 *) d;
for (; n_pixels >= 2; n_pixels -= 2)
{
......@@ -1345,9 +1351,9 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
d32++;
}
uint16 *a16 = (uint16 *) a32;
uint16 *b16 = (uint16 *) b32;
uint16 *d16 = (uint16 *) d32;
a16 = (uint16 *) a32;
b16 = (uint16 *) b32;
d16 = (uint16 *) d32;
for (; n_pixels >= 1; n_pixels -= 1)
{
......@@ -1380,6 +1386,12 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
uint64 *d = (uint64 *) _op->D;
uint64 *a = (uint64 *) _op->A;
uint64 *b = (uint64 *) _op->B;
uint32 *a32;
uint32 *b32;
uint32 *d32;
uint16 *a16;
uint16 *b16;
uint16 *d16;
gulong n_pixels = _op->n_pixels;
asm volatile ("movq %0,%%mm0"
......@@ -1407,9 +1419,9 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
d++;
}
uint32 *a32 = (uint32 *) a;
uint32 *b32 = (uint32 *) b;
uint32 *d32 = (uint32 *) d;
a32 = (uint32 *) a;
b32 = (uint32 *) b;
d32 = (uint32 *) d;
for (; n_pixels >= 2; n_pixels -= 2)
{
......@@ -1431,9 +1443,9 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
d32++;
}
uint16 *a16 = (uint16 *) a32;
uint16 *b16 = (uint16 *) b32;
uint16 *d16 = (uint16 *) d32;
a16 = (uint16 *) a32;
b16 = (uint16 *) b32;
d16 = (uint16 *) d32;
for (; n_pixels >= 1; n_pixels -= 1)
{
......
......@@ -1055,6 +1055,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
GimpContext *context;
GimpItem *active_item = NULL;
TileManager *new_tiles;
const gchar *message = NULL;
gboolean new_layer;
gboolean mask_empty;
......@@ -1065,19 +1066,25 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
{
case GIMP_TRANSFORM_TYPE_LAYER:
active_item = (GimpItem *) gimp_image_active_drawable (display->image);
message = _("There is no layer to transform.");
break;
case GIMP_TRANSFORM_TYPE_SELECTION:
active_item = (GimpItem *) gimp_image_get_mask (display->image);
message = _("There is no selection to transform.");
break;
case GIMP_TRANSFORM_TYPE_PATH:
active_item = (GimpItem *) gimp_image_get_active_vectors (display->image);
message = _("There is no path to transform.");
break;
}
if (! active_item)
return;
{
gimp_message (display->image->gimp, GIMP_PROGRESS (display), message);
return;
}
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (display->image));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment