Improve window drawing performance.