Closed Bug 1781722 Opened 3 years ago Closed 11 months ago

On pinch-zooming, testcase blurs and seams/tiles are visible on the screen

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

VERIFIED FIXED
133 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- wontfix
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox131 --- wontfix
firefox132 --- wontfix
firefox133 --- fixed
firefox134 --- verified
firefox135 --- verified

People

(Reporter: mayankleoboy1, Assigned: gw)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Open the attached testcase
Pinch-zoom slowly
At certain zoom levels, the testcase will become blurry, and seams/tiles will be visible on the screen

See attached video

Attached file Testcase.html
Attached file about:support

I dont have the exact regression range, but i think i started noticing this during bug 1749380 and co.

Flags: needinfo?(gwatson)
Severity: -- → S3
Assignee: nobody → gwatson
Flags: needinfo?(gwatson)
Blocks: 1782834

Did a regression , and found this :

2022-08-13T12:38:12.078000: DEBUG : Found commit message:
Bug 1749380 - Part 2 - Performance and quality fixes for part 1. r=gfx-reviewers,nical

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

Regressed by: 1749380

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

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

I made a further reduced testcase here: https://codepen.io/jamienicol/pen/LYwpmmg

Importantly it has to have a gradient (doesn't matter which type) and a blur.

The issue occurs when the size of the gradient gets clamped to the max picture size (4096) here. In this case we overwrite the value of surface.device_pixel_scale.

Shortly afterwards when calculating the std deviation for the blur here we multiply the width/height by both surface.local_scale and surface.device_pixel_scale. For a gradient that was just under 4096 pixels, the local_scale will be some value, let's say 4.1, and the device_pixel_scale will be 1.0. For a gradient that was just over 4096 pixels and was therefore clamped, the local scale will be let's say 4.2, and the device pixel scale will be something like 4.15. We therefore end up with a much larger blur std deviation if the picture size was just over 4096 vs just under. This results in the bluriness.

I don't quite have the mental model of how this is supposed to work, but perhaps here where we override the device_pixel_scale in the clamped case, we should also be setting the local_scale to (1.0, 1,0). It fixes the issue at hand, and doesn't appear to cause any test failures. Does that make sense to you, Glenn? Or do you have an alternative suggestion?

Flags: needinfo?(gwatson)

I think that sounds like a reasonable fix, yes.

Flags: needinfo?(gwatson)

When a picture exceeds the maximum surface size we clamp the size to
the the maximum and ensure it is rendered at the adjusted scale by
setting the device pixel scale accordingly. However, we erroneously
did not additionally reset the local_scale to 1.0. For pictures used
as blur inputs, this resulted in both the device pixel scale and local
scale being used to calculate the std deviation, resulting in too much
blur.

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b5a1e9c0870d Ensure blur std deviation is calculated correctly for pictures that exceed max surface size. r=gfx-reviewers,aosmond
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

This is fixed for me on the latest Nightly. Thanks!

Blocks: 1847012

Reproducible on a 2024-10-01 Nightly build on macOS 14.
Verified as fixed on Firefox Nightly 135.0a1 and Firefox 134.0b1 on macOS 14, Windows 10, Ubuntu 22.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-133b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: