diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-04-24 16:36:45 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-04-24 23:21:29 +0200 |
commit | ac0953c34d287e00559829e575b3308ccf46cb0b (patch) | |
tree | 598d474ea9a329fb6744ece33cf61c210de14123 /src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h | |
parent | 11f14c3b0dee239644097b3eddbbf464e4d69600 (diff) |
macOS: Handle failure to create display link or invalid display link
In some rare situations the display link may fail to create, or will
be created in an uninitialized state:
https://bugzilla.mozilla.org/show_bug.cgi?id=1201401#c123
When the latter happens the display link thread will crash in
CVCGDisplayLink::getDisplayTimes(). Based on the Mozilla bug
report, and subsequent patch, we can detect this situation via
CVDisplayLinkGetCurrentCGDisplay(), so we follow the same
approach, and then bail out:
https://bugzilla.mozilla.org/show_bug.cgi?id=1201401#c158
Once we bail out we fall back to the timer based approach
to delivering the update request. The next requestUpdate()
will try to use the display link again, which will likely
work this time around, as the display has had time to fully
initialize.
Pick-to: 6.5
Change-Id: Ib80fd792516d1e4e7f863a82755cbf00d1eb6c34
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.h')
0 files changed, 0 insertions, 0 deletions