Optimize transform handling.
Invalidate before changing rendering related properties.