As filed in https://bugs.webkit.org/show_bug.cgi?id=50807, attached updated patch tries to disable the SmoothPixmapTransforms in drawing images which are scaled to smaller size but without rotation. Does it make sense? I can see it improves the performance of the attached test page by 6X~7X. :-)
diff -BburN qt.old/ImageQt.cpp qt/ImageQt.cpp
--- qt.old/ImageQt.cpp 2010-12-08 15:26:15.237726493 +0800
+++ qt/ImageQt.cpp 2010-12-09 18:22:20.817755997 +0800
@@ -189,6 +189,13 @@
// Test using example site at
// http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html
+ float tsw = src.width();
+ float tsh = src.height();
+ float tw = dst.width();
+ float th = dst.height();
+ if( tw <= tsw && th <= tsh &&
ctxt->platformContext()->combinedTransform().type() <= QTransform::TxScale){
+ painter->setRenderHint(QPainter::SmoothPixmapTransform, false);
+ }
painter->drawPixmap(dst, *image, src);
On 10/26/2010 06:11 PM, Benjamin Poulain wrote:
> Hi
> I am not sure why you think that.
>* *This will give aliasing when you rotate + scale.
Title: MicroBench - Resizing Picture
Micro-Benchmark: Testing Resizing Picture
Repeat Counter:Results:
Interpolation.4.7.0.patch
Description: Binary data
<<attachment: test.jpg>>
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
