This reverts commit bdc412f149.
Original change's description:
> Revert "Reland "Omit inner join geometry when possible""
>
> This reverts commit 44edd1952a.
>
> Reason for revert: problematic gold diffs (e.g. paths-data-10-t) and androit CTS failures
>
> Original change's description:
> > Reland "Omit inner join geometry when possible"
> >
> > This is a reland of 1b0a95e0ee
> >
> > Original change's description:
> > > Omit inner join geometry when possible
> > >
> > > There is some relatively cheap math we can do to determine easy cases
> > > when the inner join geometry can be skipped. This CL is not
> > > comprehensive in that there may be other cases where we can skip the
> > > geometry.
> > >
> > > Only handling miter joins in this CL - the other join types can likely
> > > have similar logic, but will require a bit more computation to compute
> > > the inner (reflected) miter point.
> > >
> > > Misc notes:
> > > - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> > > the old behavior.
> > > - Modified stroker to track "previous previous" point, which is the
> > > start point of the previous line segment.
> > >
> > > Bug: b/165379671, skia:11964
> > > Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Tyler Denniston <tdenniston@google.com>
> >
> > Bug: b/165379671, skia:11964
> > Change-Id: If8bf183db9379d0a98a6f88e70f871a559692a60
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423821
> > Reviewed-by: Tyler Denniston <tdenniston@google.com>
> > Commit-Queue: Tyler Denniston <tdenniston@google.com>
>
> TBR=reed@google.com,tdenniston@google.com
>
> Change-Id: I5a2dfd402269db6c788f0e0625f67e9bf3b1f5cf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: b/165379671, skia:11964
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426059
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/165379671, skia:11964
Change-Id: Icfd420954a291f414fc2cb5cc2fe2756224a5d8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436518
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Adds a GM reproducing triangulator failure. The stroker generated
geometry shown in the GM had two edges intersecting on the inner
contour. One of the edges was practically vertical, such that its top
and bottom vertices X coordinates differed by 1ulp (approx 4.8e-7 when
x = 7.5). The intersection was computed correctly in double but then
clamped to exactly 7.5 when stored back in float at (7.5, ~11), which
is still a reasonable intersection point along the edge represented
by (7.5,0) to (7.5000048,~68).
However, with a sorting direction of horizontal for the vertices,
vertices are sorted on increasing x and then *decreasing* y. The
computed intersection is then technically above the edge's top
vertex. In the original code, the edge was not considered flat, so
it assumes that the intersection vertex is below the top vertex
and above the bottom vertex.
The issue was with the nearly_flat function only checking the difference
against machine epsilon without taking the magnitude of the vertices
into account. However, just changing nearly_flat to use ulp instead of
epsilon led to infinite recursion and asserts on a number of tests due
to inaccuracies in edge intersection tests. To address these issues,
I reworked clamp() to work on X and Y independently, which avoids the
need to check nearly_flat entirely. Additionally, edge intersection
detects when it might be inaccurate due to really large vertex coords
and recursively splits to reject false positives.
Bug: skia:12244
Change-Id: I9a92a163e8c53af799332f1f9369fccd3a9fbf31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432196
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 44edd1952a.
Reason for revert: problematic gold diffs (e.g. paths-data-10-t) and androit CTS failures
Original change's description:
> Reland "Omit inner join geometry when possible"
>
> This is a reland of 1b0a95e0ee
>
> Original change's description:
> > Omit inner join geometry when possible
> >
> > There is some relatively cheap math we can do to determine easy cases
> > when the inner join geometry can be skipped. This CL is not
> > comprehensive in that there may be other cases where we can skip the
> > geometry.
> >
> > Only handling miter joins in this CL - the other join types can likely
> > have similar logic, but will require a bit more computation to compute
> > the inner (reflected) miter point.
> >
> > Misc notes:
> > - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> > the old behavior.
> > - Modified stroker to track "previous previous" point, which is the
> > start point of the previous line segment.
> >
> > Bug: b/165379671, skia:11964
> > Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Tyler Denniston <tdenniston@google.com>
>
> Bug: b/165379671, skia:11964
> Change-Id: If8bf183db9379d0a98a6f88e70f871a559692a60
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423821
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
TBR=reed@google.com,tdenniston@google.com
Change-Id: I5a2dfd402269db6c788f0e0625f67e9bf3b1f5cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/165379671, skia:11964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426059
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This is a reland of 1b0a95e0ee
Original change's description:
> Omit inner join geometry when possible
>
> There is some relatively cheap math we can do to determine easy cases
> when the inner join geometry can be skipped. This CL is not
> comprehensive in that there may be other cases where we can skip the
> geometry.
>
> Only handling miter joins in this CL - the other join types can likely
> have similar logic, but will require a bit more computation to compute
> the inner (reflected) miter point.
>
> Misc notes:
> - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> the old behavior.
> - Modified stroker to track "previous previous" point, which is the
> start point of the previous line segment.
>
> Bug: b/165379671, skia:11964
> Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
Bug: b/165379671, skia:11964
Change-Id: If8bf183db9379d0a98a6f88e70f871a559692a60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423821
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This reverts commit 1b0a95e0ee.
Reason for revert: breaking g3, other downstream expectations
Original change's description:
> Omit inner join geometry when possible
>
> There is some relatively cheap math we can do to determine easy cases
> when the inner join geometry can be skipped. This CL is not
> comprehensive in that there may be other cases where we can skip the
> geometry.
>
> Only handling miter joins in this CL - the other join types can likely
> have similar logic, but will require a bit more computation to compute
> the inner (reflected) miter point.
>
> Misc notes:
> - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> the old behavior.
> - Modified stroker to track "previous previous" point, which is the
> start point of the previous line segment.
>
> Bug: b/165379671, skia:11964
> Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
TBR=reed@google.com,tdenniston@google.com
Change-Id: I812b39a327606b094cd22fb04b8765afc60ac722
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/165379671, skia:11964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423583
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
There is some relatively cheap math we can do to determine easy cases
when the inner join geometry can be skipped. This CL is not
comprehensive in that there may be other cases where we can skip the
geometry.
Only handling miter joins in this CL - the other join types can likely
have similar logic, but will require a bit more computation to compute
the inner (reflected) miter point.
Misc notes:
- Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
the old behavior.
- Modified stroker to track "previous previous" point, which is the
start point of the previous line segment.
Bug: b/165379671, skia:11964
Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
These paths trigger cases where we know we must add the inner join
geometry.
Bug: skia:11964
Change-Id: I9c66baf6a9f9fda55911651adae01ba1a22b3aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408156
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit 1792b19485.
Reason for revert: need to update legacy_convexity, still used by google3
Original change's description:
> Revert "Revert "Use flat version of path-direction enum""
>
> This reverts commit 0dacc6b7d3.
>
> Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
> Auto-Submit: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=reed@google.com
Change-Id: I0ecea0eb8a237298c6b908cc4bfd1cacdfc5b900
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255976
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 0dacc6b7d3.
Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit e0fbe94351.
Reason for revert: need to add guard flag to flutter
Original change's description:
> Use flat version of path-direction enum
>
> Bug: skia:9663
> Change-Id: I00077d9f2b14b3e983e6a46ef6f560cabdb1678d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242557
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: If47173d9b203b2d3a175af290a15d986accb4703
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9663
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255831
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This gm doesn't seem to have ever drawn anything onto the actual canvas,
just leaving a white background. The content is derived from a fuzzer
generated path which caused an assert in the software rasterization of
the path. Since the point is to ensure that this path does not cause an
assertion when drawn, move to the path tests.
Change-Id: Ibff77763d8079386a9b4bfe9a437ffa16856b53b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234663
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This almost gets gms to be iwyu clean. The last bit is around gm.cpp
and the tracing framework and its use of atomic. Will also need a way
of keeping things from regressing, which is difficult due to needing to
do this outside-in.
Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.
Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:8773
Change-Id: I82b1f22f300eadc93f79a35a1638b7eb6376169a
Reviewed-on: https://skia-review.googlesource.com/c/193031
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
If the input conic doesn't contain infinities, it should be possible
to compute the split conic without infinities as well. Fix the case
fuzzer exposes.
R=reed@google.com,fmalita@chromium.org
Bug: skia:7435
Change-Id: Ic128fa14ea0622188e5c43efc16b684efa342e9e
Reviewed-on: https://skia-review.googlesource.com/102425
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This reverts commit fa6b6c2d1b.
Reason for revert: Looks like this was actually caused by another change but happen to fail a test that looked very related to this
Original change's description:
> Revert "long rect dash fix with guards"
>
> This reverts commit 93ceab1b59.
>
> Reason for revert: breaking layout test
>
> Original change's description:
> > long rect dash fix with guards
> >
> > long rect dash with guards
> >
> > check dash fix back in with
> > guards against changing
> > chrome layout test results
> >
> > original change clipped against wrong rectangle
> > some of the time, causing tiled drawing to fail.
> > Always clip against outset rectangle.
> >
> > original CL: skia-review.googlesource.com/c/skia/+/84862
> >
> > efficiently dash very large rectangles and very long lines
> > Speed up dashing when lines and rects are absurdly large.
> >
> > Prior to this CL, only horizontal lines were detected.
> >
> > Also folded in a change to handle dashing of zero length lines.
> >
> > TBR=egdaniel@google.com
> > Bug: skia:7311
> > Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> > Reviewed-on: https://skia-review.googlesource.com/87768
> > Reviewed-by: Cary Clark <caryclark@skia.org>
> > Commit-Queue: Cary Clark <caryclark@skia.org>
>
> TBR=egdaniel@google.com,caryclark@skia.org
>
> Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7311
> Reviewed-on: https://skia-review.googlesource.com/88421
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,caryclark@skia.org
Change-Id: Iecdd072544e6623bc4de8d5aab1402378112512d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88424
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 93ceab1b59.
Reason for revert: breaking layout test
Original change's description:
> long rect dash fix with guards
>
> long rect dash with guards
>
> check dash fix back in with
> guards against changing
> chrome layout test results
>
> original change clipped against wrong rectangle
> some of the time, causing tiled drawing to fail.
> Always clip against outset rectangle.
>
> original CL: skia-review.googlesource.com/c/skia/+/84862
>
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
>
> Prior to this CL, only horizontal lines were detected.
>
> Also folded in a change to handle dashing of zero length lines.
>
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> Reviewed-on: https://skia-review.googlesource.com/87768
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>
TBR=egdaniel@google.com,caryclark@skia.org
Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88421
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
long rect dash with guards
check dash fix back in with
guards against changing
chrome layout test results
original change clipped against wrong rectangle
some of the time, causing tiled drawing to fail.
Always clip against outset rectangle.
original CL: skia-review.googlesource.com/c/skia/+/84862
efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.
Prior to this CL, only horizontal lines were detected.
Also folded in a change to handle dashing of zero length lines.
TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
Reviewed-on: https://skia-review.googlesource.com/87768
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
This reverts commit 4ad0c592ce.
Reason for revert: test fails in tiled case
Original change's description:
> long rect dash with guards
>
> check dash fix back in with
> guards against changing
> chrome layout test results
>
> original CL: skia-review.googlesource.com/c/skia/+/84862
>
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
>
> Prior to this CL, only horizontal lines were detected.
>
> Also folded in a change to handle dashing of zero length lines.
>
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
> Reviewed-on: https://skia-review.googlesource.com/87760
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@skia.org>
TBR=egdaniel@google.com,caryclark@skia.org
Change-Id: Ifd35ddf395826a55c72e650470527d01740b6438
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87841
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
check dash fix back in with
guards against changing
chrome layout test results
original CL: skia-review.googlesource.com/c/skia/+/84862
efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.
Prior to this CL, only horizontal lines were detected.
Also folded in a change to handle dashing of zero length lines.
TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
Reviewed-on: https://skia-review.googlesource.com/87760
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This reverts commit 1ad81981b0.
Reason for revert: broke chrome layout tests
Original change's description:
> efficiently dash very large rectangles and very long lines
>
> Speed up dashing when lines and rects are absurdly large.
>
> Prior to this CL, only horizontal lines were detected.
>
> The onOnceBeforeDraw changes are there to make debugging easier.
>
> Also folded in a change to handle dashing of zero length lines.
>
> R=reed@google.com, egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
> Reviewed-on: https://skia-review.googlesource.com/84862
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org
Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87282
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Speed up dashing when lines and rects are absurdly large.
Prior to this CL, only horizontal lines were detected.
The onOnceBeforeDraw changes are there to make debugging easier.
Also folded in a change to handle dashing of zero length lines.
R=reed@google.com, egdaniel@google.com
Bug: skia:7311
Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
Reviewed-on: https://skia-review.googlesource.com/84862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
targeted fix turns zero length line
into very short line.
R=egdaniel@google.com
Bug: skia:7387
Change-Id: Ic2a809d30d722f4e8f51d9205666dc1476a10067
Reviewed-on: https://skia-review.googlesource.com/84661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
gm.h includes sk_tool_utils.h but does not use it.
The bulk of this CL makes each gm that uses sk_tool_utils include it.
sk_tool_utils.h also provided SkRandom and SkTDArray,
so a couple GMs add those headers too.
Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1
Reviewed-on: https://skia-review.googlesource.com/10014
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary. This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.
Generally 'constexpr' or 'const' are better choices. Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).
This CL prefers constexpr where possible, and uses const where not. It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.
The scoped-to-class static has nothing to do with any of this, and is not changed.
* Not yet on the bots, which use an older TSAN.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005
Review-Url: https://codereview.chromium.org/2300623005
SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002
Review-Url: https://codereview.chromium.org/2142033002
When the parallel stroke to the curve can't be computed from
the intersection of the tangent lines, as straight line connects
the two points instead. Allow the intersection to succeed unless
the ratio isn't finite or the contribution of (1 - ratio) isn't
significant.
R=reed@google.com,fmalita@chromium.org
BUG=skia:4603
Review URL: https://codereview.chromium.org/1484873003
Reason for revert:
DEPS should be fixed now
Original issue's description:
> Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
>
> Reason for revert:
> breaks DEPS
>
> Original issue's description:
> > more zero-length changes for svg compatibility
> >
> > If a path contains a moveTo followed by a line or curve,
> > even if the line or curve has no length, SVG expects
> > the end caps to draw if the cap style is round or square.
> >
> > Fredrik Söderquist attached a patch to the chrome bug
> > (slightly modified here) that fixes layout test failures
> > resulting from deleting special-case code in SVG
> > dealing with zero-length path segments.
> >
> > R=reed@google.com,fs@opera.com
> > BUG=22974
> >
> > Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15
>
> TBR=fs@opera.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/5ca4fa3846067a47e88d35ace895df3ebe3ec2a5TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974
Review URL: https://codereview.chromium.org/1314833004
Reason for revert:
breaks DEPS
Original issue's description:
> more zero-length changes for svg compatibility
>
> If a path contains a moveTo followed by a line or curve,
> even if the line or curve has no length, SVG expects
> the end caps to draw if the cap style is round or square.
>
> Fredrik Söderquist attached a patch to the chrome bug
> (slightly modified here) that fixes layout test failures
> resulting from deleting special-case code in SVG
> dealing with zero-length path segments.
>
> R=reed@google.com,fs@opera.com
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974
Review URL: https://codereview.chromium.org/1334543002
If a path contains a moveTo followed by a line or curve,
even if the line or curve has no length, SVG expects
the end caps to draw if the cap style is round or square.
Fredrik Söderquist attached a patch to the chrome bug
(slightly modified here) that fixes layout test failures
resulting from deleting special-case code in SVG
dealing with zero-length path segments.
R=reed@google.com,fs@opera.com
BUG=22974
Review URL: https://codereview.chromium.org/1330623003