Only reset canvas transformation matrix when it has changed