summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-11 17:13:52 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-13 13:55:01 +0100
commitcd29145ddcf099acf0651aca637fc2ce65ba7546 (patch)
tree82eb5349a54a5702209f9a91810a7c2a85477be9 /tests/auto/gui
parentcce303b6a70bfc5e7f191529724969ca7509039f (diff)
macOS: Implement support for backing store static contents
We already had the machinery to copy one buffer to another, so this machinery has been generalized a bit, so we can use it to preserve the static content during buffer resize. As explained in the comments, we need to do the buffer copies during buffer creation, instead of relying on our back buffer finalization, as we are not guaranteed that we can always copy the static content from the front buffer. Pick-to: 6.7 Change-Id: Ia9b3ac6ec982949990d172b0b14f35b13bbae92a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
index 8a3d61829a..a830d14be8 100644
--- a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
+++ b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
@@ -93,6 +93,11 @@ void tst_QBackingStore::paint()
QRect rect(0, 0, 100, 100);
backingStore.resize(rect.size());
+ // Partial fill of a fresh backingstore should not crash
+ backingStore.beginPaint(QRect(0, 0, 50, 50));
+ backingStore.endPaint();
+ backingStore.flush(rect);
+
// Two rounds, with flush in between
for (int i = 0; i < 2; ++i) {
backingStore.beginPaint(rect);