Commit 79776036 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

don't call gimp_image_flush().

2004-03-15  Michael Natterer  <mitch@gimp.org>

	* app/text/gimptextlayer.c (gimp_text_layer_render): don't call
	gimp_image_flush().

	* app/tools/gimpxttool.c (gimp_text_tool_apply): call it here
	instead.

	Now that we have a common place that exchanges drawable->tiles,
	we can abstract away boundary invalidation for this operation:

	* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles):
	call gimp_drawable_invalidate_boundary() before setting
	the new tiles.

	* app/core/gimpchannel.c (gimp_channel_set_tiles)
	* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
	* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
	* app/core/gimplayer.c (gimp_layer_scale) (gimp_layer_resize)
	(gimp_layer_flip) (gimp_layer_rotate) (gimp_layer_transform)
	* app/text/gimptextlayer.c (gimp_text_layer_render): removed
	calls to gimp_drawable_invalidate_boundary() from all functions
	which finally call gimp_drawable_real_set_tiles().

	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): no
	need to set channel->bounds_known to FALSE, because
	gimp_drawable_set_tiles() already did this.
parent 8bdc3e0c
2004-03-15 Michael Natterer <mitch@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_render): don't call
gimp_image_flush().
* app/tools/gimpxttool.c (gimp_text_tool_apply): call it here
instead.
Now that we have a common place that exchanges drawable->tiles,
we can abstract away boundary invalidation for this operation:
* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles):
call gimp_drawable_invalidate_boundary() before setting
the new tiles.
* app/core/gimpchannel.c (gimp_channel_set_tiles)
* app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste)
* app/core/gimpimage-undo-push.c (undo_pop_layer_mod)
* app/core/gimplayer.c (gimp_layer_scale) (gimp_layer_resize)
(gimp_layer_flip) (gimp_layer_rotate) (gimp_layer_transform)
* app/text/gimptextlayer.c (gimp_text_layer_render): removed
calls to gimp_drawable_invalidate_boundary() from all functions
which finally call gimp_drawable_real_set_tiles().
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): no
need to set channel->bounds_known to FALSE, because
gimp_drawable_set_tiles() already did this.
2004-03-15 Sven Neumann <sven@gimp.org>
* app/gui/splash.c: moved global variables to a struct and
......@@ -1086,8 +1086,6 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
return FALSE;
}
gimp_drawable_invalidate_boundary (drawable);
if (layer && (tile_manager_bpp (tiles) == 2 ||
tile_manager_bpp (tiles) == 4))
{
......
......@@ -776,8 +776,6 @@ gimp_channel_set_tiles (GimpDrawable *drawable,
undo_desc,
GIMP_CHANNEL (drawable));
gimp_drawable_invalidate_boundary (drawable);
GIMP_DRAWABLE_CLASS (parent_class)->set_tiles (drawable,
push_undo, undo_desc,
tiles, type);
......
......@@ -1086,8 +1086,6 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
return FALSE;
}
gimp_drawable_invalidate_boundary (drawable);
if (layer && (tile_manager_bpp (tiles) == 2 ||
tile_manager_bpp (tiles) == 4))
{
......
......@@ -606,6 +606,8 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
old_has_alpha = gimp_drawable_has_alpha (drawable);
gimp_drawable_invalidate_boundary (drawable);
if (drawable->tiles)
tile_manager_unref (drawable->tiles);
......
......@@ -1407,9 +1407,6 @@ undo_pop_layer_mod (GimpUndo *undo,
lmu->offset_x = GIMP_ITEM (layer)->offset_x;
lmu->offset_y = GIMP_ITEM (layer)->offset_y;
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
GIMP_ITEM (layer)->width = tile_manager_width (tiles);
GIMP_ITEM (layer)->height = tile_manager_height (tiles);
GIMP_ITEM (layer)->offset_x = offset_x;
......
......@@ -659,9 +659,6 @@ gimp_layer_scale (GimpItem *item,
gimp_image_undo_group_end (gimage);
}
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
}
static void
......@@ -692,9 +689,6 @@ gimp_layer_resize (GimpItem *item,
gimp_image_undo_group_end (gimage);
}
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
}
static void
......@@ -719,9 +713,6 @@ gimp_layer_flip (GimpItem *item,
flip_type, axis, clip_result);
gimp_image_undo_group_end (gimage);
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
}
static void
......@@ -749,9 +740,6 @@ gimp_layer_rotate (GimpItem *item,
rotate_type, center_x, center_y, clip_result);
gimp_image_undo_group_end (gimage);
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
}
static void
......@@ -789,9 +777,6 @@ gimp_layer_transform (GimpItem *item,
progress_callback, progress_data);
gimp_image_undo_group_end (gimage);
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
}
static void
......
......@@ -488,9 +488,6 @@ gimp_text_layer_render (GimpTextLayer *layer)
gimp_item_width (item),
gimp_item_height (item));
/* Make sure we're not caching any old selection info */
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (layer));
GIMP_ITEM (drawable)->width = width;
GIMP_ITEM (drawable)->height = height;
......@@ -500,8 +497,6 @@ gimp_text_layer_render (GimpTextLayer *layer)
new_tiles, gimp_drawable_type (drawable));
tile_manager_unref (new_tiles);
layer->modified = FALSE;
gimp_drawable_update (drawable,
0, 0,
gimp_item_width (item),
......@@ -519,7 +514,7 @@ gimp_text_layer_render (GimpTextLayer *layer)
gimp_text_layer_render_layout (layer, layout);
g_object_unref (layout);
gimp_image_flush (image);
layer->modified = FALSE;
return (width > 0 && height > 0);
}
......
......@@ -429,6 +429,8 @@ gimp_text_tool_apply (GimpTextTool *text_tool)
g_list_free (text_tool->pending);
text_tool->pending = NULL;
gimp_image_flush (gimp_item_get_image (GIMP_ITEM (text_tool->layer)));
}
static gboolean
......
......@@ -989,8 +989,6 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
tile_manager_unref (new_tiles);
GIMP_CHANNEL (active_item)->bounds_known = FALSE;
gimp_drawable_update (GIMP_DRAWABLE (active_item),
0, 0,
gimp_item_width (active_item),
......
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