[Webkit-unassigned] [Bug 73186] New: [Chromium]Draw small cached canvases to an onscreen large canvas is slow when 2D canvas is HW accelerated.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 27 22:29:36 PST 2011


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

           Summary: [Chromium]Draw small cached canvases to an onscreen
                    large canvas is slow when 2D canvas is HW accelerated.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Canvas
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jin.a.yang at intel.com
                CC: mdelaney at apple.com


Run GUIMark3 "Bitmap Test" benchmark in chromium on Linux.
http://www.craftymind.com/guimark3/

This benchmark has two scenario, normal mode:GM3_JS_Bitmap.html and cached mode:GM3_JS_Bitmap_cache.html
The normal mode show 60FPS and cached mode show about 12 FPS on my platform when enable accelerated-2d-canvas. 

The normal mode: draw several small images(less than 128*128) into onscreen canvas(480*640) by call context.drawImage() when running.
The cached mode: when initialize, create a canvas for each image and draw image into this canvas. When running, just draw these cached canvases into the onscreen canvas.

The root cause is: in cached mode, when draw the cached canvas to onscreen canvas, it will load the cached canvas(ImageBuffer) into texture, but the generation id bounded with this ImageBuffer's bitmap is not saved because every time in ImageBuffer::draw(), we create a new Image based on the bitmap.
So it will not be found in the cached texture next time and will be loaded to gpu texture every time which show poor performance.

The fix is to hold an Image member for ImageBuffer, then no need to create an Image every time before draw, just like other port like ImageBufferQt.cpp does.

After the fix, the cached mode show 60FPS in my platform, same to normal mode.

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