|Summary:||[Qt] Increase the drawing performance by merging dirty rects.|
|Product:||WebKit||Reporter:||Dongseong Hwang <dongseong.hwang>|
|Severity:||Normal||CC:||mrobinson, noam, skyul, zoltan|
|Version:||528+ (Nightly build)|
|Bug Depends on:|
Description Dongseong Hwang 2012-07-12 05:12:36 PDT
QWebFramePrivate calls FrameView::paintContents as many as the number of dirty rects, so it causes too many redundant render tree traversals. I changed it to merge dirty rects and call FrameView::paintContents only once. The algorithm to merge rects is copied from GTK.
Comment 3 Kwang Yul Seo 2012-07-12 05:22:51 PDT
When parallel image decoders are in use, each image is independently repainted when decoding is finished. This creates a lot by repaint requests. So by merging these repaint requests appropriately, we can improve rendering performance.
Comment 4 Dongseong Hwang 2012-07-12 05:25:07 PDT
(In reply to comment #3) > When parallel image decoders are in use, each image is independently repainted when decoding is finished. This creates a lot by repaint requests. So by merging these repaint requests appropriately, we can improve rendering performance. I tested parallel image decoders on http://www.dorothybrowser.com/test/webkitTest/imgdecode/Pinterest.html . QWebFramePrivate called FrameView::paintContents 165 times after parallel image decoders decoded all the images. It took about 120ms. This patch decreases painting time from 120ms to 30ms.
Comment 5 Zoltan Horvath 2012-07-12 08:32:09 PDT
Nice improvement! I'd also include the improvement numbers into the changelog, otherwise looks cool!
Comment 6 Noam Rosenthal 2012-07-12 09:08:43 PDT
Comment on attachment 151917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151917&action=review Awesome! > Source/WebKit/qt/Api/qwebframe.cpp:363 > + const unsigned int cRectThreshold = 10; > + const float cWastedSpaceThreshold = 0.75f; We can do without the c prefix.
Comment 7 Kwang Yul Seo 2012-07-12 14:37:44 PDT
Committed r122507: <http://trac.webkit.org/changeset/122507>
Comment 8 Kwang Yul Seo 2012-07-12 14:39:25 PDT
Thanks. I landed the patch after updating the ChangeLog and removing c prefix from constant names.