DescriptionHelper for checking if an SVGTextFragment is transformed
Add a isTransformed() helper to SVGTextFragment. Since it's a commonly
recurring pattern to compute the fragment transform and then check if
it is the identity transform - and doing the check before actually
computing the transform is only marginally more expensive (since we
know the structure of SVGTextFragment::lengthAdjustTransform) we can
use this helper and switch order of computation and check. The only
potential downside would be if the resulting transform ends up being
the identity transform - which seems like an edge-case.
With this in place, we can do additional improvements around the
handling of fragment bounding boxes et.c. and change how the fragment
is "parametrized".
BUG=571415
Committed: https://crrev.com/6d462873c9d90978d22c52de38fb16c44a181ce1
Cr-Commit-Position: refs/heads/master@{#366567}
Patch Set 1 #
Messages
Total messages: 8 (3 generated)
|