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

Issue 849679 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

SVG path pixelated

Reported by vsync.de...@gmail.com, Jun 5 2018

Issue description

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

Steps to reproduce the problem:
1. Hand-draw an SVG curvy path with a stroke and save the file
2. Open chrome and look at the file
3. There you have it, pixels

What is the expected behavior?
The SVG path should be rendered smooth, just like Firefox.

What went wrong?
SVG path seems pixalated

Did this work before? N/A 

Chrome version: 66.0.3359.181  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Demo: https://jsbin.com/qixixigahi/edit?html,output
 
svg_pixelated_chrome_vs_FF.png
28.0 KB View Download
SVG "shape-rendering" properties does not solve this

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering
Components: Blink>SVG

Comment 3 by f...@opera.com, Jun 5 2018

Components: -Blink>SVG Internals>Skia
Labels: OS-Linux OS-Mac
It looks like you have repeated the same subpath several times. This means that successive subpaths gets blended into each other, resulting in this "ragged" look.

It should be enough to just have:

M15.891,164s140.3,58.8,164.37,51.336,35.349-47.747,58.015-49.928,119.4,23.529,119.4,23.529c7.646,1.72,17.333,24.618-7.712,25.1-23.317.452-64.04-15.743-77.683-3s-49.526,69.62-69.015,72.561c-13.508,2.054-55-.09-67.015-2.7s-17.476,15.9-1,19.816c29.887,7.1,103.982,23.966,120.362,12.817S290.887,273,312.3,273.6,488,330.642,488,330.642

This should render the same as in Firefox (before and after hopefully too) and as a bonus be more efficient.

Since this is an effect of the stroker+rasterizer combo I'll pass this on to the Skia team to let them ponder if they want to anything here, but I think it's WontFix.
Labels: Needs-Triage-M66
Cc: liyuqian@chromium.org reed@google.com
Status: Available (was: Unconfirmed)

Comment 6 by reed@google.com, Jun 5 2018

Cc: csmartdalton@chromium.org fmalita@chromium.org
Hmmm, looks smooth on my Mac ...
Screen Shot 2018-06-05 at 1.19.44 PM.png
26.2 KB View Download

Comment 7 by reed@google.com, Jun 5 2018

oh, I think mine looks better because I'm on a retina display. n/m
@reed - that screenshot doesn't look smooth AT ALL...

@f... - while you are right about the path not being properly coded, this path was exported from photoshop "shape" tool and this is how photoshop creates SVG, so I assume this happens in the "wild" quite often where designers who use photoshop sent assets, so for the sake of all the real-life situations, I beg this to be fixed. the internet is full of complaints about SVG being pixelated on Chrome and this might be the root of things: non-perfect SVG paths overlapping each-other...
Cc: allanmac@google.com
Comment #3 is exactly right.

Chrome enables Skia's newest generation of anti-aliasing technique DAA while Firefox only enables Skia's second newest generation of anti-aliasing technique AAA. DAA is faster than AAA and has the same quality as AAA unless the path heavily overlaps with itself (e.g., draw the same stroke multiple times as in this SVG).

Skia has made several small fixes to mitigate this issue in some cases: skbug.com/6886. We're also developing a long-term solution to fix this issue for all cases: @allanmac, @csmartdalton, @reed

Until we have that long-term solution landed, you probably have to either: (1) revise the path so it doesn't have many copies of the same strokes; or (2) disables DAA. Solution (1) is probably better than (2) because Skia's newer GPU AA algorithm CCPR may also have this issue.

Here's the demo that removes 3 copies of the duplicate strokes and leave only one in the SVG: https://jsbin.com/yozuyivapo/edit?html,output
Status: WontFix (was: Available)

Sign in to add a comment