Closed Bug 2004350 Opened 6 months ago Closed 6 months ago

[Wayland/KDE] KWin rendering is blurred for some window sizes

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox145 --- unaffected
firefox146 --- unaffected
firefox147 --- fixed
firefox148 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

After Bug 2000769 implementation KWin (KDE) renders blurred output for some window sizes. Looks like 'stable' rounding is not implemented correctly there.

Blocks: wayland-kde
Priority: -- → P3
Summary: [Wayland] KWin rendering is blurred for some window sizes → [Wayland/KDE] KWin rendering is blurred for some window sizes

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

Testing on latest Nightly and KDE git master Wayland 150% global scale, I also indeed see blurring in the middle of the window (similar to Bug 1990378, which is also still occurring) at certain window sizes.

Attaching two screenshots to demonstrate (where KDE's meta+ctrl+scroll zoom to show pixel grid feature helped greatly)

I think this seems like Bug 2000769 patch regressing things back to how they were before the Bug 1849092#c71 fix (which made things look great until now)?

Attached image example (sharp)
Attached image example (blurry)

And afaict the state at sharp window sizes after Bug 2000769, is identical pixel-wise to how it was at all sizes before Bug 2000769

(Note I have not confirmed myself that it was specifically 2000769 that regressed this, but I can do mozregression too if it'd help)

Hello Tem, yes, Bug 2000769 may regress it. Firefox switched to stable rounding (https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143#note_1343171) which is supposed to map subsurfaces almost correctly. The thing is that subsurface size is calculated from both position and size as:

size = round((subsurface_size + subsurface_pos) * scale) - round(subsurface_pos * scale)

so the position actually also affects subsurface size. Do you think KWin can be updated for it?
Thanks.

Flags: needinfo?(variable_valuables761)

I expected KWin uses that already but I'm wrong apparently.

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

Hi thanks for all these efforts!

Paraphrasing some stuff from kwin matrix over to here to keep track:
The main blocker for full Wayland wp-fractional-scale-v2 (https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/149) is lack of client impl, and FF would be a great one.

The kwin impl (https://invent.kde.org/plasma/kwin/-/merge_requests/3170) is large and frequently needs daunting rebases, but otherwise in theory is ready to test I think. As for when it can be merged, Vlad said Plasma 6.6 already has many changes and could maybe squeeze it in, but maybe more manageable for 6.7 or later. KDE version/extension of the protocol might be a good option for this.

Do you think KWin can be updated for it? I expected KWin uses that already but I'm wrong apparently

Yeah, I was blindly hoping any of several recent tweaks in git master would help, but seems not. So as for a small self-contained change in the short term just for this stable rounding method, I'm not sure myself, Vlad or Xaver might know better :)

Flags: needinfo?(variable_valuables761)

Do I understand right that the state before Bug 2000769 was {KDE sharp, GNOME blurry} and after that it's now {KDE blurry, GNOME sharp} with no extra patches to GNOME?

(In reply to Tem PQD [:tempqd] from comment #11)

Do I understand right that the state before Bug 2000769 was {KDE sharp, GNOME blurry} and after that it's now {KDE blurry, GNOME sharp} with no extra patches to GNOME?

I can confirm the GNOME part of that.

(In reply to Tem PQD [:tempqd] from comment #11)

Do I understand right that the state before Bug 2000769 was {KDE sharp, GNOME blurry} and after that it's now {KDE blurry, GNOME sharp} with no extra patches to GNOME?

Yes, exactly. KWin specific fallback to old rounding is Bug 2005160.

Duplicate of this bug: 2005160

Hm, unfortunately simple revert of Bug 2000769 doesn't fix that for KDE. I suspect the solution lies somewhere in the bunch of fractional rounding patches which landed in 147.0.

Assignee: nobody → stransky
Status: NEW → ASSIGNED
Severity: -- → S3
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/97db2d6fd7bb https://hg.mozilla.org/integration/autoland/rev/121e777bdb76 Revert "Bug 2004350 [KDE] Don't use stable subsurface rounding on KDE r=emilio" for causing build bustage on WaylandSurface.cpp

Backed out for causing build bustage on WaylandSurface.cpp

Backout link

Push with failures

Failure log

Flags: needinfo?(stransky)

Updated, thanks.

Flags: needinfo?(stransky)
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch

Comment on attachment 9532328 [details]
Bug 2004350 [KDE] Don't use stable subsurface rounding on KDE r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Blurred rendering on KDE/Wayland and fractionally scaled displays.
  • Is this code covered by automated tests?: No
  • 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): Reverted to old behavior for KDE only.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9532328 - Flags: approval-mozilla-beta?

Comment on attachment 9532328 [details]
Bug 2004350 [KDE] Don't use stable subsurface rounding on KDE r?emilio

Approved for 147.0b5.

Attachment #9532328 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: