app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()

which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
This commit is contained in:
Michael Natterer
2012-03-22 14:13:17 +01:00
parent 2ff19d7087
commit a0c1007b66
12 changed files with 115 additions and 174 deletions

View File

@ -101,9 +101,9 @@ gimp_drawable_real_apply_region (GimpDrawable *drawable,
GimpDrawableUndo *undo;
gimp_drawable_push_undo (drawable, undo_desc,
NULL,
x1, y1,
x2 - x1, y2 - y1,
NULL, FALSE);
x2 - x1, y2 - y1);
undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image));
@ -258,9 +258,9 @@ gimp_drawable_real_replace_region (GimpDrawable *drawable,
/* If the calling procedure specified an undo step... */
if (push_undo)
gimp_drawable_push_undo (drawable, undo_desc,
NULL,
x1, y1,
x2 - x1, y2 - y1,
NULL, FALSE);
x2 - x1, y2 - y1);
/* configure the pixel regions */
pixel_region_init (&src1PR, gimp_drawable_get_tiles (drawable),