WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
50807
[Qt] Possibility to reduce extra SmoothPixMapTransform during image drawing
https://bugs.webkit.org/show_bug.cgi?id=50807
Summary
[Qt] Possibility to reduce extra SmoothPixMapTransform during image drawing
chunrong
Reported
2010-12-10 04:18:11 PST
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();
Attachments
A simple test page
(1.46 KB, text/html)
2010-12-10 04:20 PST
,
chunrong
no flags
Details
The tested image for the test page
(10.90 KB, image/pjpeg)
2010-12-10 04:22 PST
,
chunrong
no flags
Details
The proposed simple patch
(668 bytes, patch)
2010-12-10 04:23 PST
,
chunrong
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
chunrong
Comment 1
2010-12-10 04:20:33 PST
Created
attachment 76181
[details]
A simple test page
chunrong
Comment 2
2010-12-10 04:22:30 PST
Created
attachment 76182
[details]
The tested image for the test page
chunrong
Comment 3
2010-12-10 04:23:42 PST
Created
attachment 76183
[details]
The proposed simple patch
Benjamin Poulain
Comment 4
2011-01-28 18:42:55 PST
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
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug