summaryrefslogtreecommitdiffstats
path: root/tests/auto/qimage
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-04-26 11:40:09 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-06-07 10:41:00 (GMT)
commit0d7e6839172f5feae2c81c5c552f685520504afc (patch)
treec11f086cd38330e33e30c65de04e941f7cefa5fb /tests/auto/qimage
parente55b6a34ea06646e81b559a0605aabc150119565 (diff)
downloadQt-0d7e6839172f5feae2c81c5c552f685520504afc.zip
Qt-0d7e6839172f5feae2c81c5c552f685520504afc.tar.gz
Qt-0d7e6839172f5feae2c81c5c552f685520504afc.tar.bz2
qdrawhelper: optimize fetchTransformedBilinear
When scaling down, there is no need to keep 8 bit accurancy on the position 4 bit is enough and should not be noticable for the human eye. Also optimize the pure scaling if there is no rotation: when scaling up, do the average between the top and the bottom row then use this pre-computation later. Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qimage')
-rw-r--r--tests/auto/qimage/tst_qimage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index 16deb03..10514d9 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -1465,9 +1465,9 @@ void tst_QImage::smoothScale3()
QRgb cb = b.pixel(x, y);
// tolerate a little bit of rounding errors
- QVERIFY(compare(qRed(ca), qRed(cb), 3));
- QVERIFY(compare(qGreen(ca), qGreen(cb), 3));
- QVERIFY(compare(qBlue(ca), qBlue(cb), 3));
+ QVERIFY(compare(qRed(ca), qRed(cb), 16));
+ QVERIFY(compare(qGreen(ca), qGreen(cb), 16));
+ QVERIFY(compare(qBlue(ca), qBlue(cb), 16));
}
}
}