summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-02-22 17:52:43 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-02-23 13:01:28 +0000
commit714bddf9921a4e12f03867118c6a4697083e6a14 (patch)
tree2e5ff6ab86c80a1ff75b674bfce5b7dd28358f01
parentb70bdb111e16d9437f60725f8c2854014a569289 (diff)
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: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--examples/webenginewidgets/demobrowser/Info_mac.plist2
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc7
2 files changed, 9 insertions, 0 deletions
diff --git a/examples/webenginewidgets/demobrowser/Info_mac.plist b/examples/webenginewidgets/demobrowser/Info_mac.plist
index ccd4b3f28..25443f7be 100644
--- a/examples/webenginewidgets/demobrowser/Info_mac.plist
+++ b/examples/webenginewidgets/demobrowser/Info_mac.plist
@@ -41,5 +41,7 @@
</array>
<key>NOTE</key>
<string>DemoBrowser by The Qt Company Ltd.</string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <string>YES</string>
</dict>
</plist>
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 615e3eed0..851507659 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -131,6 +131,13 @@
\li Text fields might be painted with a different style on Mountain Lion (\macos 10.8).
\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
If a new default QSurfaceFormat with a modified OpenGL profile has to be set, it should be set