Here's a thought - at some point, we expect that
there will be a recording mechanism for GIMP, and
when that happens, perhaps some coupling between it
and the undo mechanism would help reduce some 
memory requirements for the undo mechanism. 

If we know whether a user action is deterministic, 
the undo action could rewind to a prior checkpoint 
where the image had been kept intact, and the actions
since that time could be reapplied to advance up to 
the previous action.

When a nondeterministic action occurs, a checkpoint 
mechanism would still need cause the image (or a portion
of it) to be kept, but that would not be necessary for 
each step.

Since creating a new layer is deterministic, deleting the
layer should be able to be undone replaying the creation
of the empty layer, thus, the undo action doesn't need 
to keep the empty layer in memory.

Exceptions: Actions that take input from external sources
would need to be treated like nondeterministic actions,
causing a checkpoint to occur.  Actions that use random
numbers could record the random number seed that is used
and be treated as deterministic.

Just a thought...


Juno Platinum $9.95. Juno SpeedBand $14.95.
Sign up for Juno Today at!
Look for special offers at Best Buy stores.
Gimp-developer mailing list

Reply via email to