Commit 714bddf9 authored by Alexandru Croitor's avatar Alexandru Croitor
Browse files

Add support for macOS Airplay to Demobrowser in presence of dual GPUs


Previously when Airplay was activated and a new QWebEngineView instance
was created, a black area would be rendered inside the view.
This happened because of incompatible OpenGL contexts. The global Qt
OpenGL context could not share its textures with the newly created
"after-airplay" context, due to the contexts being used by different
GPUs (only possible on a MacBook Pro).

The fix is to add the NSSupportsAutomaticGraphicsSwitching option into
the application plist file, which informs macOS that the application
supports usage of dual GPUs, and thus allows sharing of contexts
across GPUs.

Task-number: QTBUG-54053
Change-Id: Ic37fb75f164922bcca6456054174171fa9ba2bfb
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Showing with 9 additions and 0 deletions
...@@ -41,5 +41,7 @@ ...@@ -41,5 +41,7 @@
</array> </array>
<key>NOTE</key> <key>NOTE</key>
<string>DemoBrowser by The Qt Company Ltd.</string> <string>DemoBrowser by The Qt Company Ltd.</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<string>YES</string>
</dict> </dict>
</plist> </plist>
...@@ -131,6 +131,13 @@ ...@@ -131,6 +131,13 @@
\li Text fields might be painted with a different style on Mountain Lion (\macos 10.8). \li Text fields might be painted with a different style on Mountain Lion (\macos 10.8).
\endlist \endlist
\section1 macOS Airplay Support on MacBooks with Dual GPUs
To make Qt WebEngine work correctly when streaming to an AppleTV from a MacBook that supports
GPU switching, it is important to add the \c NSSupportsAutomaticGraphicsSwitching option to the
application Info.plist file, with the value set to \c YES. Otherwise rendering issues might
occur when creating new web engine view instances after Airplay is switched on or off.
\section1 Default QSurfaceFormat OpenGL Profile Support \section1 Default QSurfaceFormat OpenGL Profile Support
If a new default QSurfaceFormat with a modified OpenGL profile has to be set, it should be set If a new default QSurfaceFormat with a modified OpenGL profile has to be set, it should be set
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment