Closed Bug 1707209 Opened 5 months ago Closed 5 months ago

[wayland] Implement experimental fractional scaling support

Categories

(Core :: Graphics, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: rmader, Assigned: rmader)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Fractional scaling currently comes at a high performance cost as we only support integer scaling for rendering. The overdraw ratio is something like (ceil(scale) / scale)^2, which for 125% scaling means we're drawing 2.56 times as much as we should.

In theory we already support everything needed to have proper fractional scaling: Webrender support appears to be in great shape and on the Wayland side we can use the wp_viewporter protocol to have arbitrary buffer size <-> surface size relationships. The main blocker remains the lack of proper negotiation between client and compositor about the optimal buffer size.

In order to speed up the upstream discussion, lets implement it via a fixed value that can be set in about:config for testing purposes. It will, of course, require wp_viewporter support from the compositor.

Fractional scaling currently comes at a high performance cost as we
only support integer scaling for rendering. The overdraw ratio is
something like (ceil(scale) / scale)^2, which for 125% scaling means
we're drawing 2.56 times as much as we should.

In theory we already support everything needed to have proper fractional
scaling: Webrender support appears to be in great shape and on the Wayland
side we can use the wp_viewporter protocol to have arbitrary
buffer size <-> surface size relationships. The main blocker remains the
lack of proper negotiation between client and compositor about the
optimal buffer size.

In order to speed up the upstream discussion, lets implement it via a
fixed value that can be set in about:config for testing purposes
(widget.wayland.fractional_buffer_scale).
It will, of course, require wp_viewporter support from the compositor.

Assignee: nobody → robert.mader
Status: NEW → ASSIGNED
Pushed by robert.mader@posteo.de:
https://hg.mozilla.org/integration/autoland/rev/3b393f95a2b4
[wayland] Implement experimental fractional scaling support, r=stransky
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Regressions: 1707816
Regressions: 1708033
Regressions: 1709319

I’m trying this out at present after being mildly displeased with devicePixelRatio being 2 rather than 1.5; how interested are you in bug reports? I’ve already filed bug 1730114, but as I collect more I’m reflecting that I’m not sure if you want this stuff yet, or if the upstream negotiation should happen first, and it’s distinctly possible that all of this stuff has the same root cause anyway. And at least under Sway, most of this stuff can’t be reproduced on master gtk3 anyway, needing gtk!3898 to fix popups.

(“More”: checkboxes in menus are overlarge; popups are overlarge for the first frame or so; popups sometimes render with their bottoms clipped off—keep clicking the Application Menu button to reproduce that; or altogether invisible until sufficient interaction—seen most of the time on extension toolbar popups; menus two or three levels deep are very overlarge and flicker persistently; context menu occasionally gets placed incorrectly.)

Regressions: 1730114
No longer regressions: 1730114
See Also: → 1730114
Depends on: 1730114
No longer depends on: 1730114
You need to log in before you can comment on or make changes to this bug.