diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-27 16:04:34 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-13 14:17:50 +0000 |
commit | 3664ef28fc26325ddd9135737f2ff534dabbb44d (patch) | |
tree | 8fa4ab961cf05fd4daf1bf9f6281652b6070ff96 /tests | |
parent | 9c438a066126b3c7a7ebffb81500767e2a4392ab (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.
Change-Id: Icc09c9488386925116779c9024669a4329b38247
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 996061a1c0d5cd8413ffb6a97cb25b8da9ed811b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 3 |
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 42f336bc0b..bcf9a37fa3 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -5999,8 +5999,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); |