macOS: Don't deliver update requests for windows that need display
If a window needs display due to e.g. being resized, we need to wait until the corresponding expose event has been delivered before we resume update requests, otherwise the update requests may result in partial paints that do not fully cover the area needing display. Change-Id: Ibfb54bfe3c2e85b606ef67d34a6a5fdb85456edd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>bb10
parent
9435526d50
commit
850c922036
|
|
@ -1487,6 +1487,17 @@ void QCocoaWindow::requestUpdate()
|
|||
|
||||
void QCocoaWindow::deliverUpdateRequest()
|
||||
{
|
||||
// Don't send update requests for views that need display, as the update
|
||||
// request doesn't carry any information about dirty rects, so the app
|
||||
// may end up painting a smaller region than required. (For some reason
|
||||
// the layer and view's needsDisplay status isn't always in sync, even if
|
||||
// the view is layer-backed, not layer-hosted, so we check both).
|
||||
if (m_view.layer.needsDisplay || m_view.needsDisplay) {
|
||||
qCDebug(lcQpaDrawing) << "View needs display, deferring update request for" << window();
|
||||
requestUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
qCDebug(lcQpaDrawing) << "Delivering update request to" << window();
|
||||
QPlatformWindow::deliverUpdateRequest();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue