I see that current Webkit performs quite a few of SmoothPixmapTransform during image drawing. Some of them might be optimizable. Attach patch wants to disable the transform in drawing images which are scaled to smaller size without rotation. I also attached a simple test webpage which can shows 6X~8X performance difference in my testing. --- 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); ctxt->restore();
Created attachment 76181 [details] A simple test page
Created attachment 76182 [details] The tested image for the test page
Created attachment 76183 [details] The proposed simple patch
Please follow http://trac.webkit.org/wiki/QtWebKitBugs when reporing bug here. Closing as invalid, this ha already been discussed on the mailing list. Note that when you include a patch, you should set the review flag (r?) and include a changelog. See https://trac.webkit.org/wiki/QtWebKitContrib.