summaryrefslogtreecommitdiffstats
path: root/src/core/macos_context_type_helper.mm
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-06-221-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix not working acceleration on MacMichal Klocek2020-08-051-0/+5
| | | | | | | | | Since 6ff79478a in base we no longer are able to query for 'cqlcontextobj' add helper call for CGLContextObj. Change-Id: Ie1992ab7a0e525c2c6b5f9a67ce354a493e993e8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Create an OpenGL 4.1 CoreProfile on macOS unless requested otherwiseMichael Brüning2020-07-061-0/+49
Chromium has blacklisted OpenGL version prior to 4.1 on macOS. To re-enable hardware acceleration in WebEngine on macOS, set the default surface format to a 4.1 CoreProfile before creating the shared OpenGL context, unless the surface format has been set to a specific other version. According to https://support.apple.com/en-us/HT202823 , the newest Mac that only had support for OpenGL 3.3 was released in Mid 2011, so this should be okay on the majority of machines. If the user requests an OpenGL 3.2 profile, it will also work as the Cocoa QPA plugin enables sharing between 3.2 and 4.x contexts. If the surface format has been requested to be a version lower than OpenGL 3.2 or not a core profile, warn the user about the lack of hardware acceleration. To ensure that we have actually created native contexts for the requested profile and not a context backed by the Apple Software Renderer, we query the context native renderer ID using Cocoa methods. Task-number: QTBUG-81693 Task-number: QTBUG-75262 Change-Id: I94e2e9913c8481fa8db37eb8381a89769026c919 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>