[quote]Remember that after we decide to accelerate the image for the first time, a lot of stuff has to be done: we need to process the image and find an unused color to be used as color key in ddraw blit operation, then the image needs to be transferred from system memory to VRAM, and only after that the HW handles the blit from the new accelerated surface to the destination.
For larger images this overhead is, of course, higher.
BTW, this process has to be repeated each time after you render to that image.
But once the image gets accelerated, the speed of the consequent copies should be comparable for 32x32 and 256x256 images.
[/quote]
What I was trying to demonstrate was that the overhead in calling drawImage() for an already HW accelerated image is quite hefty.
For example, if we imagined a single 256 x 256 image as the equivalent of 256 16 x 16 portions, and tried to blit the whole image onto the screen in a single frame, using the test I mentioned in a previous post, we get the following FPS:
For a P4 3.0ghz with ATI Radeon 9800 PRO,
16 x 16, 256 drawImage() per frame: 280+ FPS
256 x 256, 1 drawImage() per frame: 1700+ FPS
For a Athlon 1.33ghz with GF2,
16 x 16, 256 drawImage() per frame: 360+ FPS
256 x 256, 1 drawImage() per frame: 750+ FPS
For the first case, the difference is 6x (why so large? Hardware issue?). For the second, 2x.
So, for the most part, I would rather blit entire images on screen in a single drawImage() call rather than use multiple drawImage() calls with “dirty rectangles”.