Mark changed regions dirty instead of bounding box of changes
This helps a bit with LinuxFB on low end devices. Change-Id: I16fcce23e7073272d1d1c6bc660c255163b96c30 Fixes: QTBUG-88174 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
039d3fe4e8
commit
8d5b7df0b6
@ -138,14 +138,14 @@ void QFbWindow::lower()
|
||||
void QFbWindow::repaint(const QRegion ®ion)
|
||||
{
|
||||
const QRect currentGeometry = geometry();
|
||||
const QRect dirtyClient = region.boundingRect();
|
||||
const QRect dirtyRegion = dirtyClient.translated(currentGeometry.topLeft());
|
||||
const QRect oldGeometryLocal = mOldGeometry;
|
||||
mOldGeometry = currentGeometry;
|
||||
// If this is a move, redraw the previous location
|
||||
if (oldGeometryLocal != currentGeometry)
|
||||
platformScreen()->setDirty(oldGeometryLocal);
|
||||
platformScreen()->setDirty(dirtyRegion);
|
||||
auto topLeft = currentGeometry.topLeft();
|
||||
for (auto rect : region)
|
||||
platformScreen()->setDirty(rect.translated(topLeft));
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user