SDL: optimized redraw using user defined event