mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-26 04:31:39 +08:00
5.13.2: better patch by https://codereview.qt-project.org/c/qt/qtbase/+/283280
This commit is contained in:
parent
6cf3527708
commit
d7048c2056
@ -112,13 +112,13 @@ private:
|
||||
QRect m_geometry;
|
||||
QRect m_availableGeometry;
|
||||
QDpi m_logicalDpi;
|
||||
qreal m_refreshRate = 0;
|
||||
int m_depth = 0;
|
||||
qreal m_refreshRate;
|
||||
int m_depth;
|
||||
QString m_name;
|
||||
QImage::Format m_format;
|
||||
QSizeF m_physicalSize;
|
||||
QCocoaCursor *m_cursor;
|
||||
qreal m_devicePixelRatio = 0;
|
||||
qreal m_devicePixelRatio;
|
||||
|
||||
CVDisplayLinkRef m_displayLink = nullptr;
|
||||
dispatch_source_t m_displayLinkSource = nullptr;
|
||||
|
@ -471,6 +471,15 @@ void QCocoaScreen::deliverUpdateRequests()
|
||||
// it on the main thread yet, because the processing of the update request is taking
|
||||
// too long, or because the update request was deferred due to window live resizing.
|
||||
qDeferredDebug(screenUpdates) << ", " << framesAheadOfDelivery << " frame(s) ahead";
|
||||
|
||||
// We skip the frame completely if we're live-resizing, to not put any extra
|
||||
// strain on the main thread runloop. Otherwise we assume we should push frames
|
||||
// as fast as possible, and hopefully the callback will be delivered on the
|
||||
// main thread just when the previous finished.
|
||||
if (qt_apple_sharedApplication().keyWindow.inLiveResize) {
|
||||
qDeferredDebug(screenUpdates) << "; waiting for main thread to catch up";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
qDeferredDebug(screenUpdates) << "; signaling dispatch source";
|
||||
|
Loading…
Reference in New Issue
Block a user