Reduce reallocations caused by bitmap cache
Add prefetching to image flip code