Apply correct matrix to correct points in GrDashOp

The 'pts' coordinates should be transformed by the view matrix. We could
instead apply the inverse src rotation to ptsRot when determining the
perpendicular and parallel scales, but this is valid and straight
forward.

When determining the device segment lengths in onPrepare, we do need to
transform the ptsRot by fSrcInvRot (which includes the view matrix),
instead of just the view matrix.

This fixes the linked chromium bug, which drew a wider stroked dash
because on a perfect vertical, the rotation to a canonical x-axis
geometry would end up swapping perpendicular and parallel scale factors.

Bug: chromium:1113794
Change-Id: Ibc37f8a24688a76e0d0947b0c53c8bd13cd769cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309443
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
3 files changed