New issue
Advanced search Search tips

Issue 710293 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: 2017-04-24
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Chrome downgrades render quality of SVG images when their file size is above ~3kB

Reported by seanpram...@gmail.com, Apr 11 2017

Issue description

Chrome Version       : 57.0.2987.133
OS Version: OS X 10.12.4
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5:
  Firefox 4.x:
     IE 7/8/9:

What steps will reproduce the problem?
1. In Chrome, open an SVG file with a size of less than 3kB (attached)
2. Note rendering quality (smooth edges with good anti-aliasing) 
3. In Chrome, open an SVG file with a size of more than 5kB (attached)
4. Note rendering quality (jagged edges with poor anti-aliasing)

What is the expected result?

SVG files render smoothly regardless of size.

What happens instead of that?

SVG files larger than ~3kB are rendered at a lower quality.

Please provide any additional information below. Attach a screenshot if
possible.

- The issue occurs when a single SVG element is too large, or when two separate SVG elements have a combined size that is too large
- Wrapping the SVG code in DIVs or other elements does not resolve the issue
- Changing the shape-rendering or image-rendering attributes do not resolve the issue

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
 
svg rendering comparison.png
104 KB View Download
example svg 2.75kB.html
2.7 KB View Download
example svg 5.5kB.html
5.4 KB View Download

Comment 1 by tapted@chromium.org, Apr 11 2017

Components: Blink>SVG

Comment 2 by f...@opera.com, Apr 11 2017

Components: Internals>Skia Internals>GPU>Rasterization
It looks like we end up using different rendering code-paths in these two cases, and the latter (larger) is rendered with a path that uses fewer "samples"/coverage levels (4 or so?) per pixel.
Could you attach the contents of of chrome://gpu?
Cc: rbasuvula@chromium.org
Labels: Needs-Feedback
Tested in chrome # 57.0.2987.113 and Canary #59.0.3068.1 on Mac 10.12.3 and not able to reproduce the issue.Please find the screen shots for your reference.

@Reporter: Could you please let me know if i have missed anything and if possible,Please create new profile without extensions and apps.Re-check once and let us know the observations of the issue which would help us to triage the issue further.

Thanks in Advance.
710293.png
106 KB View Download
Labels: BugSource-User PaintTeamTriaged-20170411
NextAction: 2017-04-24
I created a totally blank profile and was still able to recreate it (see attached).

I can't think of anything else different about my configuration...
svg rendering comparison 04-11-2017 11.11.33 AM.png
222 KB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 11 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "rbasuvula@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by ericrk@chromium.org, Apr 11 2017

seanpramsey@, can you navigate to about:gpu and either paste or attach the contents of that page? That will give us a bit more info about your configuration and my help us narrow down the issue.

Thanks!

Comment 9 by ericrk@chromium.org, Apr 11 2017

Owner: senorblanco@chromium.org
Status: Assigned (was: Unconfirmed)
OK, tracked this down - the rough-edged look is happening with the MSAA path renderer in GPU raster. non-MSAA GPU raster and SW raster look fine.

senorblanco@, is the MSAA path going to go away when the veto is removed? Or will we still use it for some cases? If it's going away, we may just want to double-check that this case looks good with the new system.
We're keeping the veto-to-MSAA and MSAA path renderer where available.

At a rough guess from the PNGs, this looks like we're getting 2 samples of MSAA, which should never happen: it should require a minimum of 4 on HiDPI or 8 or LoDPI.

about:gpu would be very helpful.
Looking at the quality of the AA in the picture attached to #1, it does appear that the user is getting 2xMSAA - I thought I could repro locally, but I appear to be getting 4xMSAA, which doesn't look nearly as bad. Attached a reference image.
MSAA_Sample.png
23.0 KB View Download
MSAA_Sample_Scaled.png
49.9 KB View Download
Labels: Needs-Feedback
I think we need about:gpu to make forward progress on this.

seanpramsey@, could you provide that when you get a chance?
Sure thing. Let me know if you need anything else.
gpu.htm
67.3 KB View Download
From looking at your about:gpu, it appears that you are forcing GPU MSAA sample count to 2 (either via about:flags or via --gpu-rasterization-msaa-sample-count). Resetting this to "Default" in about:flags or dropping the command line should address the quality issue.

FWIW, you're also using the "--ignore-gpu-blacklist" flag, which should be unneeded on your system (your GPU config should be fully supported at this point), and can lead to stability issues (although should just be a no-op on your system).

Let me know if removing the --gpu-rasterization-msaa-sample-count command line or ressetting "GPU rasterization MSAA sample count." category in about:flags fixes the problem. Thanks!
This happens to me too, chrome://flags/#gpu-rasterization-msaa-sample-count is set as Default.

My GPU is NVIDIA 720m, but I am using Intel integrated graphic for Chrome as people said this saves battery power.
gpu.html
153 KB View Download
loorongjie@, it seems like your system is using software rasterization, so I don't think this is the same issue.

Can you attach a screenshot of what you're seeing? Thanks!
Sorry for the late reply. I disabled the two settings you mentioned (--gpu-rasterization-msaa-sample-count and --ignore-gpu-blacklist) and it improved anti-aliasing slightly, but it stills renders differently that when there is only one instance of the image (see attached).
Screen Shot 2017-04-17 at 3.28.30 PM.png
19.4 KB View Download
Status: WontFix (was: Assigned)
This appears to be working as intended. With a sufficient number of concave paths, we will use 4xMSAA on high-DPI devices, which will have different results than the software-and-upload (CPU) path.

Sign in to add a comment