xcb: Don't mark scrolled area as flushed when doing client side scroll
The m_pendingFlush variable is used to track what is missing in the server side backingstore. If we're doing a client side scroll the pending area is still the same. If we were to always discard the scrolled area from m_pendingFlush we would get in trouble on the next non-client side scroll, as we think the content exists server-side. Pick-to: 6.2 Change-Id: Ie50a99a8e5d8a83d1299c53534a1c83c6bfb47bd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
12af9ce6db
commit
71f75bf6c5
|
|
@ -493,10 +493,13 @@ bool QXcbBackingStoreImage::scroll(const QRegion &area, int dx, int dy)
|
|||
} else {
|
||||
ensureGC(m_xcb_pixmap);
|
||||
|
||||
if (hasShm())
|
||||
shmPutImage(m_xcb_pixmap, m_pendingFlush.intersected(scrollArea));
|
||||
else
|
||||
if (hasShm()) {
|
||||
QRegion partialFlushRegion = m_pendingFlush.intersected(scrollArea);
|
||||
shmPutImage(m_xcb_pixmap, partialFlushRegion);
|
||||
m_pendingFlush -= partialFlushRegion;
|
||||
} else {
|
||||
flushPixmap(scrollArea);
|
||||
}
|
||||
|
||||
for (const QRect &src : scrollArea) {
|
||||
const QRect dst = src.translated(delta).intersected(bounds);
|
||||
|
|
@ -508,15 +511,13 @@ bool QXcbBackingStoreImage::scroll(const QRegion &area, int dx, int dy)
|
|||
dst.x(), dst.y(),
|
||||
dst.width(), dst.height());
|
||||
}
|
||||
|
||||
if (hasShm())
|
||||
m_pendingFlush -= destinationRegion;
|
||||
}
|
||||
|
||||
m_scrolledRegion |= destinationRegion;
|
||||
|
||||
if (hasShm()) {
|
||||
m_pendingFlush -= scrollArea;
|
||||
m_pendingFlush -= m_scrolledRegion;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue