diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 2ab56a22a..acd909f3c 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -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) diff --git a/qutebrowser/config/qtargs.py b/qutebrowser/config/qtargs.py index 9341b2004..a6c9233d6 100644 --- a/qutebrowser/config/qtargs.py +++ b/qutebrowser/config/qtargs.py @@ -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, }, } diff --git a/tests/unit/config/test_qtargs.py b/tests/unit/config/test_qtargs.py index 4f70c820c..5048222a3 100644 --- a/tests/unit/config/test_qtargs.py +++ b/tests/unit/config/test_qtargs.py @@ -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)