New issue
Advanced search Search tips

Issue 869172 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

SVG path incorrectly simplified when using GPU Rasterization

Reported by amelia.b...@gmail.com, Jul 30

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36

Example URL:
https://codepen.io/emeeks/pen/EpoRNw

Steps to reproduce the problem:
1. On a system with GPU rasterization enabled (not sure which GPU, problem was reported by a MacOS user):
2. Create & stroke an SVG path with multiple segments that form a straight line (as might be created by data viz software, drawing a line chart where the value doesn't change).
3. Also add a close-path (Z) command at the end of the path data.

What is the expected behavior?
The full length of the path will be stroked, and then back again for the close-path edge.

What went wrong?
In affected rendering environments, only the first segment of the path is stroked.

See https://twitter.com/Elijah_Meeks/status/1024011250303266816 for screenshot.

Disabling the #enable-gpu-rasterization flag fixed the problem.

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: 68  Channel: stable
OS Version: 10.0
Flash Version: 

Possibly related to these other GPU rasterization / SVG Path rendering bugs, but possibly not:

- https://bugs.chromium.org/p/chromium/issues/detail?id=845783
- https://bugs.chromium.org/p/chromium/issues/detail?id=835793
- https://bugs.chromium.org/p/chromium/issues/detail?id=760475
- https://bugs.chromium.org/p/chromium/issues/detail?id=812720
- https://bugs.chromium.org/p/chromium/issues/detail?id=712329
 
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Unable to reproduce the issue on reported chrome version 68.0.3440.75 using Mac 10.13.5 and Windows 10. Attaching screen-cast for reference.
Steps: 
---------
1. Launched reported chrome 
2. Enabled chrome flag #enable-gpu-rasterization
3. Navigated to given URL " https://codepen.io/emeeks/pen/EpoRNw " 
As we are observed that The full length of the path is stroked

@Reporter: Could you please review the attached screen-cast and confirm if anything being missed here.Request you to retry this issue with fresh profile without any extensions/apps or reset all the flags and let us know if issue still persists.

Thanks..!
869172.mp4
2.8 MB View Download
Labels: Needs-Triage-M68
Components: -Blink Blink>SVG
Components: -Blink>SVG Internals>GPU>Rasterization
Labels: -Pri-2 -Needs-Feedback Pri-1
Status: Untriaged (was: Unconfirmed)
phanindra.mandapaka@, your video shows the problem. The top line should be the same length as the bottom line, at least according to Firefox.

But this is a GPU rendering issue, so over to them. And increasing the priority. Not being able to draw a line is a pretty serious problem. My guess is that this is the same as https://bugs.chromium.org/p/chromium/issues/detail?id=812720
Owner: senorblanco@chromium.org
Status: Assigned (was: Untriaged)
senorblanco: more gpu path rasterization bugs for you to triage/investigate
Owner: bsalo...@google.com
This one seems to be related to the AALinearizingConvexPathRenderer. If I comment that out in GrPathRendererChain, the bug disappears.

Brian, could you take a look and/or triage?
Status: Started (was: Assigned)
I have a repro and SKP. On my linux machine I only get the repro if I increase the zoom.
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/0235c648b7dbf0c8ef8741d376b041383678a369

commit 0235c648b7dbf0c8ef8741d376b041383678a369
Author: Brian Salomon <bsalomon@google.com>
Date: Fri Aug 31 17:34:23 2018

Fix GrAAConvexTessellator colinear point removal.

We weren't checking whether the new point in lineTo was backtracking or not.

Also:
Replace distance-to-line check with triangle area check. The previous check
was asymmetric. Given point sequence (a, b, c) it might make a different
decision than when given (c, b, a).

Compute normals late since we don't use them to detect colinear edges
anymore.

Rename SkPointPriv::SetOrhog -> SkPointPriv::MakeOrthog and return
computed value rather than take SkPoint* dst.

Bug:  chromium:869172 


Change-Id: I8da53edf1a2e6098f4199da57368ebb644866e4c
Reviewed-on: https://skia-review.googlesource.com/150682
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>

[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/gm/convex_all_line_paths.cpp
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/gpu/ops/GrAAConvexPathRenderer.cpp
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/gpu/ops/GrAAConvexTessellator.cpp
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/gpu/GrPathUtils.cpp
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/gpu/ops/GrAAConvexTessellator.h
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/gpu/ops/GrAAHairLinePathRenderer.cpp
[modify] https://crrev.com/0235c648b7dbf0c8ef8741d376b041383678a369/src/core/SkPointPriv.h

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 31

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

commit f4aa8aad2ecf12eeebe43ac9c6fcd709b3de0ccd
Author: skia-chromium-autoroll <skia-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Aug 31 20:30:18 2018

Roll src/third_party/skia 9951cbf4ca79..7bfe8438a94b (13 commits)

https://skia.googlesource.com/skia.git/+log/9951cbf4ca79..7bfe8438a94b


git log 9951cbf4ca79..7bfe8438a94b --date=short --no-merges --format='%ad %ae %s'
2018-08-31 bsalomon@google.com Test glbetex and glbert configs on BonusConfigs bots
2018-08-31 swiftshader-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com Roll third_party/externals/swiftshader 5fb5e817a20d..fe5861bf5bb1 (1 commits)
2018-08-31 stani@google.com Support more hardware buffer formats
2018-08-31 michaelludwig@google.com Fixes for primitive handling for uniforms
2018-08-31 jvanverth@google.com Simplify perspective shadows to match future MD specs.
2018-08-31 fmalita@chromium.org [skottie] Lazily-initialized default font manager
2018-08-31 benjaminwagner@google.com Unomit passing tests for Radeon.
2018-08-31 benjaminwagner@google.com Remove GTX1070 and GTX1050 jobs.
2018-08-31 bsalomon@google.com Fix GrAAConvexTessellator colinear point removal.
2018-08-31 benjaminwagner@google.com [infra] Add rack dimension for QuadroP400 tasks.
2018-08-31 benjaminwagner@google.com Unomit passing tests for Win Intel.
2018-08-31 recipe-roller@chromium.org Roll recipe dependencies (trivial).
2018-08-31 brianosman@google.com Revert "Add support for gray + colorspace to SkCodec"


Created with:
  gclient setdep -r src/third_party/skia@7bfe8438a94b

The AutoRoll server is located here: https://autoroll.skia.org/r/skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel

BUG=chromium:113555199, chromium:869172 ,chromium:784662
TBR=stephana@chromium.org

Change-Id: I75ea11ce12a9a2eed101571b2adfde0c7c93ced8
Reviewed-on: https://chromium-review.googlesource.com/1199694
Reviewed-by: skia-chromium-autoroll <skia-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: skia-chromium-autoroll <skia-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#588150}
[modify] https://crrev.com/f4aa8aad2ecf12eeebe43ac9c6fcd709b3de0ccd/DEPS

Status: Fixed (was: Started)

Sign in to add a comment