Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Issue 2388833002: Fix SkPath::arcTo when sweepAngle is tiny and radius is big (Closed)

Created:
4 years, 2 months ago by xidachen
Modified:
4 years, 2 months ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix SkPath::arcTo when sweepAngle is tiny and radius is big 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 Committed: https://skia.googlesource.com/skia/+/6069ddabd8385ff838236dc25d7354e71649c9f3

Patch Set 1 #

Patch Set 2 : real fix #

Patch Set 3 : radiusX != radiusY #

Patch Set 4 : remove stdio #

Total comments: 8

Patch Set 5 : address comments #

Patch Set 6 : add a comment in code #

Patch Set 7 : fix compile error on win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -3 lines) Patch
M gm/addarc.cpp View 1 2 3 4 5 6 3 chunks +40 lines, -3 lines 0 comments Download
M src/core/SkPath.cpp View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (21 generated)
xidachen
PTAL. Does this make sense?
4 years, 2 months ago (2016-10-03 15:11:51 UTC) #6
reed1
can you create a gm or unittest that shows this CL fixing the behavior?
4 years, 2 months ago (2016-10-03 15:22:47 UTC) #10
xidachen
On 2016/10/03 15:22:47, reed1 wrote: > can you create a gm or unittest that shows ...
4 years, 2 months ago (2016-10-03 15:24:47 UTC) #11
reed1
On 2016/10/03 15:24:47, xidachen wrote: > On 2016/10/03 15:22:47, reed1 wrote: > > can you ...
4 years, 2 months ago (2016-10-03 15:30:37 UTC) #12
xidachen
New patch is ready, the title and description for CL are changed as well.
4 years, 2 months ago (2016-10-04 01:39:50 UTC) #15
xidachen
gentle ping
4 years, 2 months ago (2016-10-05 13:23:15 UTC) #16
caryclark
https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp File src/core/SkPath.cpp (right): https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp#newcode1302 src/core/SkPath.cpp:1302: oval.centerY() + radiusY * sinf(endAngle)); SkScalarSinCos() is preferable https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp#newcode1303 ...
4 years, 2 months ago (2016-10-05 14:08:12 UTC) #17
xidachen
https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp File src/core/SkPath.cpp (right): https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp#newcode1302 src/core/SkPath.cpp:1302: oval.centerY() + radiusY * sinf(endAngle)); On 2016/10/05 14:08:11, caryclark ...
4 years, 2 months ago (2016-10-05 14:24:33 UTC) #18
caryclark
https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp File src/core/SkPath.cpp (right): https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp#newcode1302 src/core/SkPath.cpp:1302: oval.centerY() + radiusY * sinf(endAngle)); A comment in the ...
4 years, 2 months ago (2016-10-05 14:47:04 UTC) #19
xidachen
https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp File src/core/SkPath.cpp (right): https://codereview.chromium.org/2388833002/diff/60001/src/core/SkPath.cpp#newcode1302 src/core/SkPath.cpp:1302: oval.centerY() + radiusY * sinf(endAngle)); On 2016/10/05 14:47:03, caryclark ...
4 years, 2 months ago (2016-10-05 16:33:51 UTC) #20
caryclark
lgtm
4 years, 2 months ago (2016-10-05 16:43:21 UTC) #22
xidachen
On 2016/10/05 16:43:21, caryclark wrote: > lgtm Thanks Cary. After this CL, there will be ...
4 years, 2 months ago (2016-10-05 17:31:52 UTC) #23
f(malita)
On 2016/10/05 17:31:52, xidachen wrote: > On 2016/10/05 16:43:21, caryclark wrote: > > lgtm > ...
4 years, 2 months ago (2016-10-05 17:36:34 UTC) #24
xidachen
On 2016/10/05 17:36:34, f(malita) wrote: > On 2016/10/05 17:31:52, xidachen wrote: > > On 2016/10/05 ...
4 years, 2 months ago (2016-10-05 19:48:55 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2388833002/120001
4 years, 2 months ago (2016-10-06 12:41:08 UTC) #35
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 12:42:26 UTC) #37
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://skia.googlesource.com/skia/+/6069ddabd8385ff838236dc25d7354e71649c9f3

Powered by Google App Engine
This is Rietveld 408576698