mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 06:14:03 +00:00
new inernal function which removes all tiles from a given drawable from
2004-02-16 Michael Natterer <mitch@gimp.org> * libgimp/gimptile.[ch] (_gimp_tile_cache_flush_drawable): new inernal function which removes all tiles from a given drawable from the cache. * libgimp/gimpdrawable.c (gimp_drawable_detach): call the new function before freeing the tiles. Fixes bug #134562.
This commit is contained in:
parent
de483e6b67
commit
1434675850
|
@ -1,3 +1,12 @@
|
|||
2004-02-16 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/gimptile.[ch] (_gimp_tile_cache_flush_drawable): new
|
||||
inernal function which removes all tiles from a given drawable
|
||||
from the cache.
|
||||
|
||||
* libgimp/gimpdrawable.c (gimp_drawable_detach): call the new
|
||||
function before freeing the tiles. Fixes bug #134562.
|
||||
|
||||
2004-02-16 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/gimppixelrgn.c: cleaned up a bit: added missing
|
||||
|
|
|
@ -61,6 +61,9 @@ gimp_drawable_detach (GimpDrawable *drawable)
|
|||
|
||||
gimp_drawable_flush (drawable);
|
||||
|
||||
/* nuke all references to this drawable from the cache */
|
||||
_gimp_tile_cache_flush_drawable (drawable);
|
||||
|
||||
if (drawable->tiles)
|
||||
g_free (drawable->tiles);
|
||||
if (drawable->shadow_tiles)
|
||||
|
|
|
@ -155,6 +155,25 @@ gimp_tile_cache_ntiles (gulong ntiles)
|
|||
gimp_tile_height () * 4 + 1023) / 1024);
|
||||
}
|
||||
|
||||
void
|
||||
_gimp_tile_cache_flush_drawable (GimpDrawable *drawable)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (drawable != NULL);
|
||||
|
||||
list = tile_list_head;
|
||||
while (list)
|
||||
{
|
||||
GimpTile *tile = list->data;
|
||||
|
||||
list = list->next;
|
||||
|
||||
if (tile->drawable == drawable)
|
||||
gimp_tile_cache_flush (tile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
|
|
@ -46,10 +46,16 @@ void gimp_tile_ref_zero (GimpTile *tile);
|
|||
void gimp_tile_unref (GimpTile *tile,
|
||||
gboolean dirty);
|
||||
void gimp_tile_flush (GimpTile *tile);
|
||||
|
||||
void gimp_tile_cache_size (gulong kilobytes);
|
||||
void gimp_tile_cache_ntiles (gulong ntiles);
|
||||
|
||||
|
||||
/* private function */
|
||||
|
||||
void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_TILE_H__ */
|
||||
|
|
Loading…
Reference in a new issue