The method of only drawing sprites where they are dirty (i.e. they
animated or move) you can save quite a lot of time with the right
game, but if you have moving objects behind your static ones, you need
to worry about marking places dirty both before and after you draw if
you want to get things drawn right, in all cases...
I perfer to
avoid using approaches like that in favor of figuring out what simple
game-specific constraints you can exploit in a simple and provably
reliable way (like maybe you can preflatten a bunch of static objects
in a layer and erase to that, etc.) because I really dislike having to
fix graphical bugs and flicker (it's quite hard to write unit tests
for them, for instance)