I am thinking that it might be useful to have an image.tileBlit function, that blits an image with a given x, y, (and maybe width and height), and repeats it a given number of times for the width and height (or just makes the dimensions the base dimensions * number of repeats). Mostly because I found that quite a useful thing to do with a modified Majestic, and it can be done very easily in hardware.
I see some limited use for it, but not for really for custom map engines. It has a lot to do with the fact that at one point many tiles would have changed, and so not always is one tile being repeated. I think the use of a sprite batcher is better, many modern game engines use one (XNA, pixi, etc): they increase the drawing FPS 1000% in some cases.
It has to do with the communication between the CPU/RAM and GPU/VRAM. Drawing hundreds of small images can be slower than batching them into 1 image and drawing portions of that image to screen. Here's the general algorithm:
1. "Draw" all images to screen. They aren't actually being drawn at this point.
2. For each object:
a. Keep track of the image handle being used, don't store repeat handles.
b. Keep track of the x/y locations of all drawn objects.
3. Take all the images and put them into one large batch. It's up to you how to create this 'texture atlas'.
4. Send it to the GPU, and perform source/destination blits. The source being the texture-packed location of the image drawn, and the destination being where the user wanted to put it.
5. See the magic at play.
That basic framework can really speed graphics up. Of course, there's more to it. If you introduce different blit modes, they have to also be passed to the sprite batcher (so in other words it changes the API for drawing GFX). If you want to use shaders on particular blits then they might as well just be sent to different sprite batches altogether (perhaps not even seeing a speedup).
An API would be something like this, (how XNA does it).
var sb = new SpriteBatch();
while (true) {
sb.begin();
sb.blit(image, x, y, red);
sb.blit(image2, x2, y2, red);
sb.blit(image3, x3, y3, red);
sb.end();
FlipScreen();
}
The sprite batch is *not* like drawing to a canvas and drawing that whole canvas to screen. It's just an organizational tool.