Reenable accelerated 3D canvas on QtWebEngine 6.8.2+

Qt 6.8.2 has a more fine-grained workaround:
https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/606122

This never seems to have it made to Qt 6.9+, but I can't seem to reproduce the
issue anymore (neither with PDF.js nor with Google Sheets), even on older
affected Qt versions, even on older Intel hardware. Maybe something else (mesa
etc.?) changed and this was fixed there?

Let's reenable this and find out if it breaks things again for someone.

Fixes #8346
See #7489, #8001, #8006
This commit is contained in:
Florian Bruhin 2025-10-10 22:56:47 +02:00
parent ddfd17d749
commit 2b4e5757b0
3 changed files with 22 additions and 6 deletions

View File

@ -32,6 +32,11 @@ Changed
- Windows releases are now built on Windows Server 2022 (previously 2019),
which might break compatibility with older Windows releases (untested).
- The `qutedmenu` userscript now sorts history by the last access time.
- Hardware accelerated 2D canvas is now enabled by default on Qt 6.8.2+,
as graphic glitches with e.g. PDF.js and Google Sheets should be fixed
nowadays. If you still run into issues, please report them and set
`qt.workarounds.disable_accelerated_2d_canvas` to `always` to disable it
again.
[[v3.5.2]]
v3.5.2 (unreleased)

View File

@ -356,7 +356,11 @@ _WEBENGINE_SETTINGS: dict[str, dict[Any, Optional[_SettingValueType]]] = {
'qt.workarounds.disable_accelerated_2d_canvas': {
'always': '--disable-accelerated-2d-canvas',
'never': None,
'auto': lambda _versions: '--disable-accelerated-2d-canvas' if machinery.IS_QT6 else None,
'auto': lambda versions: '--disable-accelerated-2d-canvas'
if machinery.IS_QT6
and versions.webengine
and versions.webengine < utils.VersionNumber(6, 8, 2)
else None,
},
}

View File

@ -158,12 +158,17 @@ class TestWebEngineArgs:
assert '--enable-in-process-stack-traces' not in args
@pytest.mark.parametrize(
'qt6, value, has_arg',
'qt_version, qt6, value, has_arg',
[
(False, 'auto', False),
(True, 'auto', True),
(True, 'always', True),
(True, 'never', False),
('5.15.2', False, 'auto', False),
('6.5.3', True, 'auto', True),
('6.6.0', True, 'auto', True),
('6.7.0', True, 'auto', True),
('6.8.1', True, 'auto', True),
('6.8.2', True, 'auto', False),
('6.5.3', True, 'always', True),
('6.5.3', True, 'never', False),
('6.8.2', True, 'always', True),
],
)
def test_accelerated_2d_canvas(
@ -172,10 +177,12 @@ class TestWebEngineArgs:
version_patcher,
config_stub,
monkeypatch,
qt_version,
qt6,
value,
has_arg,
):
version_patcher(qt_version)
config_stub.val.qt.workarounds.disable_accelerated_2d_canvas = value
monkeypatch.setattr(machinery, 'IS_QT6', qt6)