Optimize drawing.