[Webkit-unassigned] [Bug 65207] New: [Chromium] Canvas 2D putImageData method is slow with GPU acceleration enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 26 14:04:28 PDT 2011


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

           Summary: [Chromium] Canvas 2D putImageData method is slow with
                    GPU acceleration enabled
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
               URL: http://jsperf.com/fillrect-vs-putimagedata
        OS/Version: Unspecified
            Status: ASSIGNED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: junov at chromium.org
                CC: senorblanco at chromium.org, vangelis at chromium.org


putImageData is slow for several reasons:

1) A new texture is allocated on the GPU every time a putImageData is called. It would be preferable to use a texture from a pool of recyclable textures.(functionality already available in skia)

2) RGBA to BGRA swizzling is done on the CPU.  Swizzling is free on the GPU

3) Alpha pre-multiplication is performed on the CPU. The GPU can do it faster

4) A temporary copy of thepixel data ismade in RAM for the purposes of swizzling, premultiplication and image cropping.  The transient copy could be eliminated by writing directly to the transfer buffer.

Benchmark: http://jsperf.com/fillrect-vs-putimagedata
Results for putImageData test with Chrome 13.0.782.99 beta
On HP Z600, linux, nVidia Quadro FX 380

software canvas: 1,870,324 Ops per second
GPU-accelerated canvas: 19,751 Ops per second (ouch!)

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