Commit Graph

3 Commits

Author SHA1 Message Date
Mike Reed
2ac6ce8e6e Simplify common case for recttorect
Change-Id: I70e295a677b8cac3d578e3cd57472c833af03877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354336
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-15 18:37:46 +00:00
Mike Reed
15a5403cd3 Migrate to using SkPathBuilder
Change-Id: I86a75670d7b919313747175ca3e49ef7472061fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310977
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-17 14:17:49 +00:00
Michael Ludwig
417f3a54fb 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>
2020-08-12 13:18:16 +00:00