More canvas optimizations.