Tile mode drawing optimization

Reduces CPU usage for drawing tile mode to about 50%-70% of previous value.