Closed Bug 1569215 Opened 5 years ago Closed 5 years ago

Animating a SVG with CSS causes it to become blurry

Categories

(Core :: Graphics: WebRender, defect, P2)

70 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- disabled
firefox68 --- wontfix
firefox69 --- verified
firefox70 --- verified

People

(Reporter: cynthia, Assigned: tnikkel)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: correctness, nightly-community, regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

I took a SVG (in this case the money_with_wings from Twemoji) and tried to animate it with CSS with simple rotations. Here is a working repro case: https://codesandbox.io/s/firefox-svg-bug-cw45b

This happens apparently since Firefox 68 (stable release), I had reports that it's working on 67.0.4, it was broken for me on 68.0.1 (still stable release) and it's still broken on latest Nightly build (70.0a1 2019-07-26). The bug doesn't occur in Chrome.

Actual results:

The wings become severely blurry when the animation is applied on it.

Expected results:

SVG should remain sharp

Thanks! Confirmed on Debian Testing. Does not happen without WebRender.
Animation of Twitter's like button (heart) is sometimes pixelated, too. It could be related.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: Untriaged → Graphics: WebRender
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

mozregression --good 2018-09-26 --bad 2019-01-20 --pref gfx.webrender.all:true browser.startup.homepage:'https://cw45b.csb.app/'

10:43.64 INFO: Last good revision: f1ce520b1d0d0223ee117796ead6551881ec4fc6
10:43.64 INFO: First bad revision: 996bf60e0fce90cc42e7b59201d56ba0947b8cf2
10:43.64 INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f1ce520b1d0d0223ee117796ead6551881ec4fc6&tochange=996bf60e0fce90cc42e7b59201d56ba0947b8cf2

996bf60e0fce90cc42e7b59201d56ba0947b8cf2 Timothy Nikkel — Bug 1415987. Use ChooseScale to choose a scale in WebRender. r=jrmuizel
640e15aa79b9f8b4db4014167c66e8d6d5eea37e Jeff Muizelaar — Bug 1415987. Factor out ChooseScale from ChooseScaleAndSetTransform in FrameLayerBuilder. r=tnikkel

Has Regression Range: --- → yes
Regressed by: 1415987
Flags: needinfo?(tnikkel)
Blocks: wr-69
Priority: -- → P2

This might seem like we are included the parent scale twice because it is also included in mInheritedTransform but FrameLayerBuilder::ChooseScale only incorporates the passed in scale when combining it with a scale computed purely based on the local transform induced by this stacking context item.

This also fixes bug 1564698 and doesn't regress bug 1495163 (the only testcase I can still find for the regressing bug, bug 1415987).

Attachment #9081587 - Attachment description: Bug 1569215. In StackingContextHelper constructor pass parent scale to ChooseScale. r?jrmuizel → Bug 1569215. In StackingContextHelper constructor pass parent scale to ChooseScale. r=jrmuizel
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ec20458d0b2 In StackingContextHelper constructor pass parent scale to ChooseScale. r=jrmuizel
Blocks: 1564698
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → tnikkel

Seems edge-case enough that we can let this fix ride Fx70 to release, but feel free to nominate for uplift if you feel strongly otherwise.

Flags: in-testsuite+

Comment on attachment 9081587 [details]
Bug 1569215. In StackingContextHelper constructor pass parent scale to ChooseScale. r=jrmuizel

Beta/Release Uplift Approval Request

  • User impact if declined: some animations blurry with webrender
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only affects webrender, no regressions reported on nightly.
  • String changes made/needed:
Flags: needinfo?(tnikkel)
Attachment #9081587 - Flags: approval-mozilla-beta?
Status: RESOLVED → VERIFIED

Comment on attachment 9081587 [details]
Bug 1569215. In StackingContextHelper constructor pass parent scale to ChooseScale. r=jrmuizel

Given that this is getting dupes and only affects WebRender, approved for 69.0b13. Thanks for including a new test for this.

Attachment #9081587 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I have managed to reproduce this issue using Firefox 68.0.1 (20190717172542) on Windows 10.
The issue is verified fixed on the latest Firefox Beta 69.0b13 (20190812173625) and Firefox Nightly 70.0a1 (20190812215403) on Windows 10, macOS 10.14.6 and Ubuntu 18.04.

Regressions: 1626259
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: