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>
In this function, when count is 0, it maps the dst point to start, where
it should really be stop. A test case is also added.
In the test case, it should be drawing three lines, without the change in
SkPath class, it will draw 2 lines only with the top horizontal line
missing because it maps the dst point to the start point, and hence
the horizontal line is not drawn.
BUG=640031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2409983004
Review-Url: https://chromiumcodereview.appspot.com/2409983004
In this function, it first check whether this arc is a lone point
or not. If not, it converts angles to unit vectors. The problem
here is that when the radius is huge and the sweepAngle is small,
the function angles_to_unit_vectors() could return a startV ==stopV.
When that happens, it will draw a dot at the point that corresponding
to the startAngle. This CL adds a special branch for this case, and
draw a connecting line between the points at startAngle and endAngle.
BUG=640031, skia:5807
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2388833002
Review-Url: https://codereview.chromium.org/2388833002