Commit Graph

9 Commits

Author SHA1 Message Date
John Stiles
a6841be235 Enable ClangTidy check llvm-namespace-comment.
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).

Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-06 19:07:52 +00:00
Mike Reed
2243d77c5c use pathbuilder
Bug: skia:9000
Change-Id: I08a50c9f5e9993d9dd427f154077c56f6097e947
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307345
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-01 02:32:04 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00
Mike Klein
4b432fa87b run rewrite_includes.py
Just your basic periodic cleanup.

Change-Id: I04d9ca5cfff05e6e2c29dd9caef3ce12cda45247
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219340
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-06 17:11:02 +00:00
Stephen White
c4dbc3758f GrTessellator: improved straight skeleton implementation.
This patch improves the straight skeleton implementation used by
GrTessellator to collapse overlap regions in the alpha gradient border.
The resulting quality improvement can be seen in the
"thinconcavepaths" GM, for example, where the coverage values of
the "thin right angle", "thin rect and triangle" and "skinny snake"
are now lower and match the raster backend more closely. It also improves
correctness, such as on the linked Chromium bugs below.

Previously, the straight skeleton was performed using the same Vertex
and Edge classes used for tessellation, but this led to fragility in
maintaining the connectivity and ordering required by those classes.
Instead, that functionality has been moved to new SSEdge and SSVertex
classes. Their construction results in alternating SSVertex and
SSEdges around the boundary of the each overlap region, shrunk by one
SSEdge as the boundary collapses.

Applying events may now also create further events (chained events),
as intersections between newly-adjacent bisectors change the structure
of the skeleton. This is always calculated from the bisectors of
original boundary, not the shrunk boundary of the straight skeleton,
which is why each SSEdge points at its originating Edge. If the edges
are parallel or near-parallel, the bisector may be infinite. This is
handled by a new flavour of create_event(), which does a Line/Line
intersection (rather than an Edge/Edge intersection) to find the
intersection between the infinite bisector and an adjacent bisector.

Several ancillary bugs were fixed: the priority queue used to represent
edge events was sorting the inner edges incorrectly. These need to be
sorted in descending not ascending order of coverage. Its implementation
was moved from Skia's TDPQueue to std::priority_queue(), which is more
flexible in specifying a comparator.

check_for_intersection()'s partner synthesis code was moved into a new
function, compute_bisector(), also used by the chained skeleton events
code.

Degenerate edges are now removed during the simplify_boundary() pass.
They were previously detected but ignored, causing incorrect inner and
outer tangents to be computed in stroke_boundary().

An fSynthetic flag was added to Vertex, in order to detect vertices
which cannot be moved by an edge collapse event (e.g., intersections
with non-boundary edges, merged vertices, straight skeleton vertices).

More raw implementation notes:
Connect straight skeleton vertices as we find them, so we don't
have to use partnering (ss_connect()).
Only disconnect edges which are still alive after event application.
Add a check for near-parallel lines in compute_bisector().
Don't use edge type to determine direction to offset for bisectors.
The winding should already include this information.
Move Event ownership to SSEdge.
If we're down to the last two edges in a skeleton, don't check for events.
Add concave_arc_and_circle GM.
Add a collapsepaths GM.

Bug: 941429, 913349, 929915, 945853

Change-Id: Ib89e231d0e8611f8735fd3592db6391da096369d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215094
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-22 16:16:59 +00:00