SVG path pixelated
Reported by
vsync.de...@gmail.com,
Jun 5 2018
|
||||||||
Issue descriptionUserAgent: 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
,
Jun 5 2018
,
Jun 5 2018
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.
,
Jun 5 2018
,
Jun 5 2018
,
Jun 5 2018
Hmmm, looks smooth on my Mac ...
,
Jun 5 2018
oh, I think mine looks better because I'm on a retina display. n/m
,
Jun 5 2018
@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...
,
Jun 5 2018
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.
,
Jun 5 2018
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
,
Jun 5 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by vsync.de...@gmail.com
, Jun 5 2018