diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2010-03-26 15:27:04 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2010-03-26 15:37:49 (GMT) |
commit | e9538ced914739129681362dea03ebc323602126 (patch) | |
tree | c6482bfd9d2e29e319090812ad473d7ce3101c03 /tests | |
parent | a8af0e05b30cc4ec26f58378cd5a4e11b20cf9bd (diff) | |
download | Qt-e9538ced914739129681362dea03ebc323602126.zip Qt-e9538ced914739129681362dea03ebc323602126.tar.gz Qt-e9538ced914739129681362dea03ebc323602126.tar.bz2 |
Reverts using composition mode when using DeviceCoordinateMode cache.
Going back to always blitting the newly painted areas to the cache (and
not blending it like before). To avoid painting artifacts when the item
is rotated and when it uses DeviceCoordinateMode cache mode, the entire
cache is always repainted in that case.
Task-number: QTBUG-7863
Reviewed-by: trustme
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 2b507cb..6725159 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6825,6 +6825,9 @@ void tst_QGraphicsItem::cacheMode() QTRY_COMPARE(tester->repaints, 4); QCOMPARE(testerChild->repaints, 4); QCOMPARE(testerChild2->repaints, 3); + tester->resetTransform(); + testerChild->resetTransform(); + testerChild2->resetTransform(); // Explicit update causes a repaint. tester->update(0, 0, 5, 5); @@ -6898,23 +6901,24 @@ void tst_QGraphicsItem::cacheMode() // because the parent is rotated with a perspective. testerChild->setPos(1, 1); QTest::qWait(25); - QTRY_COMPARE(tester->repaints, 10); + QTRY_COMPARE(tester->repaints, 11); QCOMPARE(testerChild->repaints, 10); QCOMPARE(testerChild2->repaints, 5); + tester->resetTransform(); // Make a huge item tester->setGeometry(QRectF(-4000, -4000, 8000, 8000)); QTest::qWait(25); - QTRY_COMPARE(tester->repaints, 11); - QCOMPARE(testerChild->repaints, 10); + QTRY_COMPARE(tester->repaints, 12); + QCOMPARE(testerChild->repaints, 11); QCOMPARE(testerChild2->repaints, 5); // Move the large item - will cause a repaint as the // cache is clipped. tester->setPos(5, 0); QTest::qWait(25); - QTRY_COMPARE(tester->repaints, 12); - QCOMPARE(testerChild->repaints, 10); + QTRY_COMPARE(tester->repaints, 13); + QCOMPARE(testerChild->repaints, 11); QCOMPARE(testerChild2->repaints, 5); // Hiding and showing should invalidate the cache @@ -6922,8 +6926,8 @@ void tst_QGraphicsItem::cacheMode() QTest::qWait(25); tester->show(); QTest::qWait(25); - QTRY_COMPARE(tester->repaints, 13); - QCOMPARE(testerChild->repaints, 11); + QTRY_COMPARE(tester->repaints, 14); + QCOMPARE(testerChild->repaints, 12); QCOMPARE(testerChild2->repaints, 6); } |