This is a no-op, and exiting early is useful as it cuts time spent in AffineTransform::multiply() from 3% to 2% when hovering links on ziglang.org.
@@ -108,6 +108,8 @@ AffineTransform& AffineTransform::set_translation(FloatPoint t)
AffineTransform& AffineTransform::multiply(AffineTransform const& other)
{
+ if (other.is_identity())
+ return *this;
AffineTransform result;
result.m_values[0] = other.a() * a() + other.b() * c();
result.m_values[1] = other.a() * b() + other.b() * d();