Canvas arcs are drawn incorrectly for very small angles
Reported by
silvansc...@gmail.com,
Aug 22 2016
|
|||||||||||
Issue descriptionUserAgent: 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.
,
Aug 23 2016
,
Aug 23 2016
,
Oct 3 2016
,
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
,
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
,
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
,
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
,
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
,
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
,
Oct 10 2016
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?
,
Oct 10 2016
brajkumar@: could you please check the test page on canary or ToT? it should have been fixed.
,
Oct 11 2016
I checked on Linux ToT, Win and Mac canary, this issue has been fixed.
,
Oct 11 2016
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.)
,
Oct 11 2016
Re-open based on #15.
,
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
,
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
,
Oct 20 2016
silvanschmitz@: could you give it a try, canary build should have it fixed now.
,
Oct 21 2016
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.)
,
Oct 27 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
,
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
,
Nov 4 2016
[Automated comment] removing mislabelled merge-merged-2840
,
Nov 28 2016
,
Feb 1 2017
This seems to be fixed on stable, as far as I can see. Please verify. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by brajkumar@chromium.org
, Aug 23 2016Status: Untriaged (was: Unconfirmed)