[Webkit-unassigned] [Bug 40884] New: [Qt] When we render WebGL offscreen, color conversion cost a lot of CPU cycles

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 20 07:30:29 PDT 2010


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

           Summary: [Qt] When we render WebGL offscreen, color conversion
                    cost a lot of CPU cycles
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: Performance, Qt, QtTriaged
          Severity: Normal
          Priority: P2
         Component: WebGL
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: benjamin.poulain at nokia.com


When rendering WebGL offscreen (if we don't have a GL surface to draw on), we render copy the gl buffer onto QImage and render the QImage.

This operation is CPU intensive. The situation is made a bit worse because of the color conversions and the image transformations.

In particular: 
-we always render to ARGB32, forcing the costly conversion to ARGB32_PM to render
-we copy the image to convert the colors: m_pixels.rgbSwapped()
-we copy one more time to mirror the image: .transformed(QMatrix().rotate(180)

To render, we end up with 3 copies of the pixels, and we have a poor use of the CPU cache.

We could convert the colors and mirror the pixels in WebKit, doing it in a single buffer, and doing the two operations together to optimize the cache.

-- 
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