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

Issue 668550 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression

Blocked on:
issue skia:5989



Sign in to add a comment

SVG AA changed with gpu acceleration

Reported by m...@sampotts.me, Nov 24 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2929.4 Safari/537.36

Steps to reproduce the problem:
1. Add <svg>s to HTML 
2. Observe extra artefacts or rendering issues that mean the SVGs are not crisp

What is the expected behavior?
SVGs should render crisp as per webkit 

What went wrong?
SVGs seem to have antialiasing issues (screenshot comparing to Safari is attached) 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 57.0.2929.4  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0

Here's the test case SVGs:
https://jsfiddle.net/SamPotts/LLLas8s5/1/

It's more noticeable on the last three where edges are not as sharp as Safari (see attached screenshot) 

This only seems to be an issue on non-retina displays
 
svg_chrome.png
13.2 KB View Download

Comment 1 by m...@sampotts.me, Nov 24 2016

Sorry, I forgot to change the "Did this work before?"... Yes it did, I'm pretty sure this was introduced a few versions ago in the stable version.  

Comment 2 by pdr@chromium.org, Nov 28 2016

Cc: ericrk@chromium.org
Components: Internals>Skia
Labels: -Type-Bug Type-Bug-Regression
Status: Available (was: Unconfirmed)
Summary: SVG AA changed with gpu acceleration (was: SVGs do not render correctly)
Thanks for taking the time to file this. As a workaround, you can add 'shape-rendering="crispEdges"' to the paths to disable anti-aliasing.


@skia team, I bisected this to [1] which is where osx switched to ganesh. I have a simpler testcase [2] where our AA now differs from software and Safari. Is this change in behavior intended?

[1] https://chromium.googlesource.com/chromium/src/+/8325892c2efdef8cff86ba16e7569f8b424daeda
[2] http://output.jsbin.com/soyocoh

Comment 3 by m...@sampotts.me, Nov 28 2016

I tried adding 'shape-rendering="crispEdges"' and it has the effect of making the SVG look like something from the 1980s :-) The preference would be to have it render as per Safari or Preview in MacOS. 

Comment 4 by hcm@chromium.org, Nov 28 2016

Cc: fmalita@chromium.org bsalomon@chromium.org
Components: Internals>GPU>Rasterization
Labels: Hotlist-Ganesh
Owner: jvanverth@chromium.org
Status: Assigned (was: Available)
I think this is likely to be another instance of skbug.com/5989
Blockedon: skia:5989
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 8 2016

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

commit 8fdb059ae890a4c736a2cd3f2638ceb083a8f589
Author: skia-deps-roller <skia-deps-roller@chromium.org>
Date: Thu Dec 08 03:03:31 2016

Roll src/third_party/skia/ d7e16661b..45aac57ac (19 commits).

https://skia.googlesource.com/skia.git/+log/d7e16661bb36..45aac57ac619

$ git log d7e16661b..45aac57ac --date=short --no-merges --format='%ad %ae %s'
2016-12-08 robertphillips Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"
2016-12-07 bsalomon Rename GrBatchFlushState to GrOpFlushState
2016-12-07 bsalomon Rename GrRTC::drawBatch to addDrawOp and local vars in GrRTC.cpp
2016-12-07 reed no need for SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT anymore
2016-12-07 reed remove SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT from android
2016-12-07 halcanary SkBitmap::ComputeIsOpaque -> SkPixmap::computeIsOpaque
2016-12-07 jvanverth Revert "Fix SDF generation for pixel-aligned paths"
2016-12-07 halcanary fix build. tests/BitmapTest w/ nogpu
2016-12-07 reed remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS for android
2016-12-07 halcanary SkBitmap::ComputeIsOpaque and SkBitmap::eraseColor support F16
2016-12-07 bsalomon Rename batch->op in GrOpList and subclasses
2016-12-07 bsalomon Rework GrRenderTargetOpList::setupDstReadIfNecessary.
2016-12-07 reed hide emboss from everyone (except android for now)
2016-12-02 brianosman Add NarrowRGB gamut mode to SampleApp
2016-12-07 brianosman Skip the sRGB mip-map testing on command buffer
2016-12-07 mtklein gn_to_bp.py fixes
2016-12-07 robertphillips Add antialiasing to SkDropShadowImageFilter's shadow draw
2016-12-07 halcanary Revert "SkImageEncoder::* going away"
2016-12-07 jvanverth Fix SDF generation for pixel-aligned paths

BUG= 668550 

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_trusty_blink_rel
TBR=herb@google.com

Review-Url: https://codereview.chromium.org/2556283003
Cr-Commit-Position: refs/heads/master@{#437161}

[modify] https://crrev.com/8fdb059ae890a4c736a2cd3f2638ceb083a8f589/DEPS

Comment 9 by pdr@chromium.org, Dec 13 2016

Cc: jvanverth@chromium.org
 Issue 673865  has been merged into this issue.
Project Member

Comment 10 by bugdroid1@chromium.org, Dec 14 2016

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 14 2016

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

commit bcd68bcb14206d4f26c5798ed714a0878ac09b28
Author: skia-deps-roller <skia-deps-roller@chromium.org>
Date: Wed Dec 14 13:16:37 2016

Roll src/third_party/skia/ 24f19780d..d316e77c1 (9 commits).

https://skia.googlesource.com/skia.git/+log/24f19780d1e7..d316e77c1e19

$ git log 24f19780d..d316e77c1 --date=short --no-merges --format='%ad %ae %s'
2016-12-14 robertphillips Revert "Add a deferred copy surface (take 2)"
2016-12-14 mtklein Revert "clamp to premul when reading premul sRGB"
2016-12-14 mtklein Revert "SkNx basically always is fast now."
2016-12-14 mtklein Revert "Do not build the ktx encoder for android framework"
2016-12-13 jvanverth Fix SDF generation for pixel-aligned paths (take two)
2016-12-13 scroggo Do not build the ktx encoder for android framework
2016-12-13 mtklein clamp to premul when reading premul sRGB
2016-12-13 mtklein SkNx basically always is fast now.
2016-12-13 robertphillips Add a deferred copy surface (take 2)

BUG= 668550 

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_trusty_blink_rel
TBR=msarett@google.com

Review-Url: https://codereview.chromium.org/2572103002
Cr-Commit-Position: refs/heads/master@{#438499}

[modify] https://crrev.com/bcd68bcb14206d4f26c5798ed714a0878ac09b28/DEPS

Status: Fixed (was: Assigned)
Should be working in version 57.0.2953.0.
Labels: Merge-Request-56
Docs is running into this bug for some updates they're doing, so it would be good to cherry-pick it back. It's been there since at least M55.

Comment 15 by dimu@chromium.org, Dec 15 2016

Labels: -Merge-Request-56 Merge-Review-56 Hotlist-Merge-Review
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.

Comment 16 by m...@sampotts.me, Dec 15 2016

This is looking good in Version 57.0.2952.0. Awesome job :-) 
Labels: -Merge-Review-56 Merge-Approved-56
Approved for merge into M56

Comment 18 by pdr@chromium.org, Dec 22 2016

Status: Assigned (was: Fixed)
Project Member

Comment 19 by bugdroid1@chromium.org, Dec 22 2016

Labels: merge-merged-m56
The following revision refers to this bug:
  https://skia.googlesource.com/skia.git/+/5c25cbedfb54b8b4bb383f775eb454c842e4fa55

commit 5c25cbedfb54b8b4bb383f775eb454c842e4fa55
Author: Brian Salomon <bsalomon@google.com>
Date: Thu Dec 22 14:39:40 2016

Fix SDF generation for pixel-aligned paths (take two)

Cherry-pick to M56

BUG= 668550 

Change-Id: Ic771818bd5a4a46b83fdb82b69b98cb6b93a23a2
Reviewed-on: https://skia-review.googlesource.com/5697
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/6413

[modify] https://crrev.com/5c25cbedfb54b8b4bb383f775eb454c842e4fa55/gm/pathfill.cpp
[modify] https://crrev.com/5c25cbedfb54b8b4bb383f775eb454c842e4fa55/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
[modify] https://crrev.com/5c25cbedfb54b8b4bb383f775eb454c842e4fa55/src/gpu/batches/GrAADistanceFieldPathRenderer.h

Labels: -Hotlist-Merge-Review -Merge-Approved-56
Status: Fixed (was: Assigned)

Sign in to add a comment