[Webkit-unassigned] [Bug 50807] New: Possibility to reduce extra SmoothPixMapTransform during image drawing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 04:18:11 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=50807

           Summary: Possibility to reduce extra SmoothPixMapTransform
                    during image drawing
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: chunronglai at gmail.com


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();

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list