Maybe you can correct me, but my understanding is that the best way to
draw flicker-less GUI elements is to use hardware acceleration for
lines and rects on an off-screen page, then set the pixels for the image
elements, and then flip.
On newer hardware, it’s actually faster to draw images in system memory,
and then do a block copy from system memory to video memory. SDL supports
hardware acceleration of this operation where possible. (The speed increase
is related to the number of PCI bus accesses and increased CPU and memory
Ideally you would hardware accelerate lines and rects and then use hardware
accelerated source colorkeying to blit the images from system memory to video
memory. This capability isn’t very common yet, however.