Closed Bug 1688929 Opened 4 years ago Closed 2 years ago

SVG pixelated on scale animation (SVG is pixelated while it is animating. Sharpens after the animation stops)

Categories

(Core :: Graphics: WebRender, defect)

Firefox 84
defect

Tracking

()

RESOLVED DUPLICATE of bug 1804872
Tracking Status
firefox-esr102 --- wontfix
firefox113 --- wontfix
firefox114 --- wontfix
firefox115 --- fixed

People

(Reporter: bugzilla, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

Add a scale keyframe animation to an SVG, either img'd or inline, from scale <1 to 1

Actual results:

The image is pixelated, or sometimes a shaded square, or somewhat blurry until the animation is complete. The scale happens as intended but the quality of the image is severely reduced.

See: https://codepen.io/jacobpake/pen/bGwXqyq

Expected results:

The image should be produced to the same quality whether it is resizing or not, as in Chromium and Safari (iOS) and presumably an older version of Firefox (I am not able to test this currently)

Attached image example.png

Whilst animation incomplete, the right hand image is distorted. The left hand side is the same SVG image with no animation

Attachment #9199313 - Attachment description: animation.png → example.png

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → SVG
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: SVG pixelated on scale animation → SVG pixelated on scale animation (SVG is pixelated while it is animating. Sharpens after the animation stops)

Can only repro with WR.

Has STR: --- → yes
Component: SVG → Graphics: WebRender

Probably a ChooseScale bug, surprisingly bug 1662062 doesn't fix this. I'll take a look and see if it's a ChooseScale issue.

Flags: needinfo?(tnikkel)
Severity: -- → S2
See Also: → 1714763
Blocks: 1782834
Severity: S2 → S3

Fix range:
Bug 1804872. Handle cases where a scale animation is being run on the compositor when choosing the size to get a decoded image at. r=aosmond

The transform on the stacking context helper has the current scale, not the largest scale of the animation. The scale on the stack context helper holds this value thanks to the logic in ChooseScale.

Before webrender we would just look at the current matrix on the gfx context so it would have final size to draw at for the animation.

I have a fix that also fixes the blob recordings/image region case but it is a little more invasive so I want to land this first. The 3rd reftest will ensure that we can't turn on blob recording without fixing that case.

Differential Revision: https://phabricator.services.mozilla.com/D175627

2023-05-20T19:21:28.725000: DEBUG : Did not find a branch, checking all integration branches
2023-05-20T19:21:28.732000: INFO : The bisection is done.
2023-05-20T19:21:28.809000: INFO : Stopped

Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1804872
Flags: needinfo?(tnikkel)
Resolution: --- → FIXED

(In reply to Timothy Nikkel (:tnikkel) from comment #5)

Regression range is
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=598d441e4ebaa93ab098d266035a396057c82129&tochange=6cbf1430a66ef5aa5f066ed77677f47ea44fc0e1

The only thing in there that looks like it could be related is bug 1574493

It was bug 1574493 actually, the changes to nsLayoutUtils::ComputeImageContainerDrawingParameters caused this.

Keywords: regression
Regressed by: wr-snapperific

Set release status flags based on info from the regressing bug 1574493

Marking as duplicate so we don't have to track those flags here too (for example this bug is already 115 fixed).

Duplicate of bug: 1804872
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: