[Webkit-unassigned] [Bug 102161] WebGL: Avoid unnecessary memory copy or conversion in texImage2D and texSubImage2D for HTMLVideoElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 16 05:24:33 PST 2012


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





--- Comment #7 from Jun Jiang <jun.a.jiang at intel.com>  2012-11-16 05:26:23 PST ---
The related pack/unpacking code in Firefox did make much improvement. 
1. All the texImage2D(...) functions for ArrayBuffer, ImageData, Image, Canvas and Video are unified to use a single texImage2D_base() function which accepts a pointer to the source data as parameter.
2. For the conversion part, it introduces a WebGLImageConverter object to do the unpack,pack and flipY operations. The flipY operation is carried out in the pack operation instead of being done separately. 
I agree that WebKit may need to merge back some changes done in Firefox. As what item 1 did, introducing the ImageLocker class can help us to abstract all the texImage2D functions to a general texImage2D_base function to use the pointer to the source data as parameter. And then we can implement the texImage2D_base in a clean and clear way.
By checking the code of Graphics ports, it seems only Skia provides Lock/Unlock operation to the pixel data while other ports like cairo, cg and qt didn't provide that. I will work on the ImageLocker class first.

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