summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-09-27 16:04:34 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-01-12 18:13:52 +0100
commit996061a1c0d5cd8413ffb6a97cb25b8da9ed811b (patch)
treeec75b4b2c3dbd7de6efaa5dd6a376e0c99a990e9 /tests/auto/widgets/kernel/qwidget
parent588f956f785203a60c1595636972beabcb2e894f (diff)
macOS: Implement QCALayerBackingStore::scroll for improved performance
The CALayer backingstore never had a scroll implementation because we were relying on the QRasterBackingStore implementation, but as it turned out that implementation was not applicable for the CALayer backingstore. We now implement scroll() by determining which part of the back buffer can be scrolled directly in-place, and then scrolling the rest by copying from the front buffer. We have to handle both cases, as clients may scroll multiple times before flushing, and the scrolled area may overlap both valid back-buffer content and content that needs to be pulled from the front-buffer. Pick-to: 6.3 6.2 Change-Id: Icc09c9488386925116779c9024669a4329b38247 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index a3698de203..c2d00d003f 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -6039,8 +6039,7 @@ void tst_QWidget::moveChild()
QTRY_COMPARE(pos, child.pos());
QTRY_COMPARE(parent.r, QRegion(oldGeometry) - child.geometry());
- if (QGuiApplication::platformName() == "cocoa")
- QEXPECT_FAIL("", "Cocoa backing store doesn't implement scroll", Abort);
+
// should be scrolled in backingstore
QCOMPARE(child.r, QRegion());
VERIFY_COLOR(child, child.rect(), child.color);