New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640031 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Canvas arcs are drawn incorrectly for very small angles

Reported by silvansc...@gmail.com, Aug 22 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Example URL:
http://jsfiddle.net/V92Gn/4587/

Steps to reproduce the problem:
1. Run the code at http://jsfiddle.net/V92Gn/4587/

What is the expected behavior?
Two pink boxes of ~10px width, delimited by arcs (of very large radii) at the top and bottom, should be drawn. (Black lines indicate the circle corresponding to the top and bottom arcs.)

What went wrong?
Only the upper box (r = 10000px, angle = 0.001rad) is drawn correctly; the lower one (r = 100000px, angle = 0.0001rad) is wrong.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 6.3
Flash Version: Shockwave Flash 22.0 r0

This sounds similar to what is described in https://bugs.chromium.org/p/chromium/issues/detail?id=492557 (which has been fixed).

The code works in Firefox 48.0.
 
Labels: M-54 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows-10, Ubuntu 14.04 and Mac OS 10.11.6 using chrome latest stable M52-52.0.2743.116. Observedvboth the pink boxes doesn't have same size of width.

This is a non-regression issue seen from past M35-35.0.1849.0, Hence marking it as untriaged.

Thnaks!

Comment 2 by f...@opera.com, Aug 23 2016

Components: -Blink Blink>Canvas

Comment 3 by junov@chromium.org, Aug 23 2016

Components: Internals>Skia
Status: Available (was: Untriaged)
Cc: junov@chromium.org
Owner: xidac...@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e629486895965713d969bd46a7d88c05792f729d

commit e629486895965713d969bd46a7d88c05792f729d
Author: xidachen <xidachen@chromium.org>
Date: Wed Oct 05 20:49:43 2016

Label some layout tests as NeedManualRebaseline

In preparation for a skia CL: https://codereview.chromium.org/2388833002/,
we need to label some layout tests as NeedsManualRebaseline

BUG= 640031 
TBR=fmalita@chromium.org

Review-Url: https://codereview.chromium.org/2396753003
Cr-Commit-Position: refs/heads/master@{#423283}

[modify] https://crrev.com/e629486895965713d969bd46a7d88c05792f729d/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a89060915da26a73c00eda27dfffa8fcb3967746

commit a89060915da26a73c00eda27dfffa8fcb3967746
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 02:35:36 2016

Add some NeedsManualRebaseline entries in layout test expectations

This is for preparation to land this skia CL:
https://codereview.chromium.org/2388833002/

BUG= 640031 
TBR=fmalita@chromium.org

Review-Url: https://codereview.chromium.org/2398893002
Cr-Commit-Position: refs/heads/master@{#423404}

[modify] https://crrev.com/a89060915da26a73c00eda27dfffa8fcb3967746/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 6 2016

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/6069ddabd8385ff838236dc25d7354e71649c9f3

commit 6069ddabd8385ff838236dc25d7354e71649c9f3
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 12:42:23 2016

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

Review-Url: https://codereview.chromium.org/2388833002

[modify] https://crrev.com/6069ddabd8385ff838236dc25d7354e71649c9f3/gm/addarc.cpp
[modify] https://crrev.com/6069ddabd8385ff838236dc25d7354e71649c9f3/src/core/SkPath.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c243409f8f9f7cfcae4264c1b1884cbef4feef3c

commit c243409f8f9f7cfcae4264c1b1884cbef4feef3c
Author: skia-deps-roller <skia-deps-roller@chromium.org>
Date: Fri Oct 07 21:11:33 2016

Roll src/third_party/skia/ d207884bf..221a4bb55 (21 commits).

https://chromium.googlesource.com/skia.git/+log/d207884bf5d1..221a4bb55b51

$ git log d207884bf..221a4bb55 --date=short --no-merges --format='%ad %ae %s'
2016-10-07 caryclark fix fuzz busters
2016-10-07 mtklein SkRasterPipeline: 8x pipelines, attempt 2
2016-10-07 senorblanco GrTessellator: refactor Line out of Edge.
2016-10-07 bungeman Whitespace change to kick build.
2016-10-07 jvanverth Reduce geometry size for circles to help fill rate.
2016-10-07 stephana Disable svgs on nanobench when running on Valgrind
2016-10-07 mtklein Revert "SkRasterPipeline: 8x pipelines"
2016-10-06 robertphillips Disable antialiasing on interior of filled RRects that need distance vectors
2016-10-06 mtklein SkRasterPipeline: 8x pipelines
2016-10-06 fmalita Assorted Android fixes
2016-10-05 bungeman Auto re-gen for gn cmake generator.
2016-10-06 robertphillips Add distance values to interior of filled RRects
2016-10-06 fmalita Harden SkPicturePlayback::handleOp() skips
2016-10-06 egdaniel Fix Vulkan orientation during screne rotations
2016-10-06 herb Fix SkDeferredCanvas for use on android.
2016-10-06 caryclark remove sprintf
2016-10-06 mtklein Make load4 and store4 part of SkNx properly.
2016-10-06 caryclark fuzzer fix
2016-10-06 reed fix other printf warning for SkBlendMode
2016-10-06 caryclark fix mac all build
2016-10-06 xidachen Fix SkPath::arcTo when sweepAngle is tiny and radius is big

BUG= 653452 , 626164 , 640031 

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
TBR=stephana@google.com

Review-Url: https://codereview.chromium.org/2405553002
Cr-Commit-Position: refs/heads/master@{#423965}

[modify] https://crrev.com/c243409f8f9f7cfcae4264c1b1884cbef4feef3c/DEPS

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed82aa88e61c002a7acd172f6416bad70beb3d50

commit ed82aa88e61c002a7acd172f6416bad70beb3d50
Author: xidachen <xidachen@chromium.org>
Date: Sun Oct 09 16:14:30 2016

Remove some NeedsManualRebaseline entries

In a previous CL: https://codereview.chromium.org/2396753003/ we label
some entries in layout tests expectations to be NeedsManualRebaseline in
order to land a skia change: https://codereview.chromium.org/2388833002/
Once the skia roll is in, we should remove these NeedsManualRebaseline
and do a Rebaseline

BUG= 640031 
TBR=fmalita@chromium.org

Review-Url: https://codereview.chromium.org/2402823002
Cr-Commit-Position: refs/heads/master@{#424103}

[modify] https://crrev.com/ed82aa88e61c002a7acd172f6416bad70beb3d50/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e8338228b933d44506a0f71ed8e2a7271132bf9

commit 0e8338228b933d44506a0f71ed8e2a7271132bf9
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Sun Oct 09 17:03:41 2016

Auto-rebaseline for r424103

https://chromium.googlesource.com/chromium/src/+/ed82aa88e

BUG= 640031 
TBR=xidachen@chromium.org

Review URL: https://codereview.chromium.org/2402253002 .

Cr-Commit-Position: refs/heads/master@{#424104}

[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/fast/canvas/canvas-arc-circumference-fill-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-arc-circumference-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-arc-circumference-fill-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-arc-circumference-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-arc-circumference-fill-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[add] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-arc-circumference-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-arc-circumference-fill-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/virtual/display_list_2d_canvas/fast/canvas/canvas-ellipse-circumference-fill-expected.png
[modify] https://crrev.com/0e8338228b933d44506a0f71ed8e2a7271132bf9/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-arc-circumference-expected.png

Cc: brajkumar@chromium.org
Labels: Needs-Feedback
Tested this issue on Mac OS 10.12, Ubuntu 14.04 and Windows-10 using chrome latest Dev #55.0.2883.6. By opening the sample test case URl http://jsfiddle.net/V92Gn/4587/ observing the arcs are drawn incorrectly for very small angles as seen in previous versions. 

Attaching screen-shot for reference, Could anyone please let us know is there any other test case available to verify this issue from Chrome-TE end?

640031
359 KB View Download
brajkumar@: could you please check the test page on canary or ToT? it should have been fixed.
Status: Fixed (was: Assigned)
I checked on Linux ToT, Win and Mac canary, this issue has been fixed.

Comment 14 Deleted

The original test case is indeed fixed on 55.0.2887.0 canary. The bug is however still present when you make a tiny adjustment in the angles: http://jsfiddle.net/V92Gn/4786/ (only change is angle1 = 1.501 * Math.PI instead of 1.5 and likewise for angle2). As before, this renders correctly on Firefox 48.0. (Indeed, my actual application looks a lot worse than before, most arc-delimited areas are not drawn at all.)
Status: Assigned (was: Fixed)
Re-open based on #15.
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 19 2016

The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/95e34a3d847684692184daea4a887f7825d65e51

commit 95e34a3d847684692184daea4a887f7825d65e51
Author: xidachen <xidachen@chromium.org>
Date: Wed Oct 19 17:24:28 2016

Correct a small mistake in SkPath::build_arc_conics

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

[modify] https://crrev.com/95e34a3d847684692184daea4a887f7825d65e51/gm/addarc.cpp
[modify] https://crrev.com/95e34a3d847684692184daea4a887f7825d65e51/src/core/SkPath.cpp

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c9b9d044f5a91651dcd88fbbdfa83748efefa0d

commit 2c9b9d044f5a91651dcd88fbbdfa83748efefa0d
Author: skia-deps-roller <skia-deps-roller@chromium.org>
Date: Wed Oct 19 20:14:11 2016

Roll src/third_party/skia/ 5e3d9c2e3..95e34a3d8 (7 commits).

https://chromium.googlesource.com/skia.git/+log/5e3d9c2e31b6..95e34a3d8476

$ git log 5e3d9c2e3..95e34a3d8 --date=short --no-merges --format='%ad %ae %s'
2016-10-19 xidachen Correct a small mistake in SkPath::build_arc_conics
2016-10-19 borenet Add key params for buildbotless bots in DM/nanobench
2016-10-17 mtklein Remove shaderc DEPS.
2016-10-19 mtklein disable packed texture tests on TSAN bot
2016-10-18 egdaniel Support inline uploads in Vulkan
2016-10-18 mtklein Remove custom NINJA_STATUS.
2016-10-19 brianosman Add helper to create random AsFPArgs for Ganesh unit tests

BUG= 640031 

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
TBR=mtklein@google.com

Review-Url: https://chromiumcodereview.appspot.com/2434033002
Cr-Commit-Position: refs/heads/master@{#426267}

[modify] https://crrev.com/2c9b9d044f5a91651dcd88fbbdfa83748efefa0d/DEPS

silvanschmitz@: could you give it a try, canary build should have it fixed now.
Almost there! It still happens with angles that are even closer to 1.5pi, this time on the second call to arc(): http://jsfiddle.net/V92Gn/4811/

It even looks like the same happens in the upper example with a radius of "only" 10000px this time.

(I've also removed the first segment of the path, because the final closePath() should yield the same result. If you leave it in, the bug does not show, likely because closePath() just "reverts" the overshoot caused by arc() in this case.)
Project Member

Comment 21 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e629486895965713d969bd46a7d88c05792f729d

commit e629486895965713d969bd46a7d88c05792f729d
Author: xidachen <xidachen@chromium.org>
Date: Wed Oct 05 20:49:43 2016

Label some layout tests as NeedManualRebaseline

In preparation for a skia CL: https://codereview.chromium.org/2388833002/,
we need to label some layout tests as NeedsManualRebaseline

BUG= 640031 
TBR=fmalita@chromium.org

Review-Url: https://codereview.chromium.org/2396753003
Cr-Commit-Position: refs/heads/master@{#423283}

[modify] https://crrev.com/e629486895965713d969bd46a7d88c05792f729d/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a89060915da26a73c00eda27dfffa8fcb3967746

commit a89060915da26a73c00eda27dfffa8fcb3967746
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 02:35:36 2016

Add some NeedsManualRebaseline entries in layout test expectations

This is for preparation to land this skia CL:
https://codereview.chromium.org/2388833002/

BUG= 640031 
TBR=fmalita@chromium.org

Review-Url: https://codereview.chromium.org/2398893002
Cr-Commit-Position: refs/heads/master@{#423404}

[modify] https://crrev.com/a89060915da26a73c00eda27dfffa8fcb3967746/third_party/WebKit/LayoutTests/TestExpectations

Comment 23 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Owner: ----
Status: Available (was: Assigned)
Status: Fixed (was: Available)
This seems to be fixed on stable, as far as I can see. Please verify.

Sign in to add a comment