Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.10.0, 5.12.3
-
None
-
macOS
Description
I have this code to force use of OpenGL 4.1 (rather than 2.1, as would be used by default):
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
format.setMajorVersion(3);
format.setMinorVersion(2);
format.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(format);
This forces use of the Core profile, which seems to be necessary for GL contexts to use versions later than 2.x on macOS (correct me if I'm wrong).
Chromium gates use of dynamic GPU switching behind a check for the "-use-gl" switch's value matching "desktop". web_engine_context.cpp sets that value to "core" when the default format's profile is core. This results in dynamic GPU switching being disabled, which in practice forces use of the high-power GPU.
I'm not sure if this should be solved by adjusting Chromium's check, or dropping the "core" switch in WebEngine. On my system, sending "desktop" on the "-use-gl" switch works fine, but I'm not sure if this would have negative implications in other cases.
Attachments
Issue Links
- duplicates
-
QTBUG-84337 QtWebEngine shows blank content: dual gfx MBP + core_profile + Airplay
-
- Closed
-