[Webkit-unassigned] [Bug 113493] Enhance the restrictions on going through the faster hardware path for uploading Canvas2D to WebGL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 1 06:50:42 PDT 2013


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





--- Comment #11 from Jun Jiang <jun.a.jiang at intel.com>  2013-04-01 06:48:52 PST ---
Hi, Gregg. Thanks for your comments.
Here I am going to resolve some undocumented details or limitation about CopyTextureCHROMIUM(...) and improve the whitelist for CopyTextureCHROMIUM(...), which is similar to what you mentioned as IsCopyTextureFormatSupportedCHROMIUM(...). The code in WebKit is expected to be cleaned to be more concise and simpler with proper comments. 
Since the whitelist is dependent on the implementation of CopyTextureCHROMIUM(...), I need your help to confirm and make sure my change won't break your ideas. The first limitation in my mind is that level must be equal to 0. The second limitation is that some combination of format/type may not be supported; The guaranteed combination is (RGB/RGBA)/UNSIGNED_BYTE while others such as RGBA/UNSIGNED_SHORT_5551 may not be supported by some underlying drivers. The third limitation is that  in current implementation for CopyTextureCHROMIUM(...), the format type of destination texture is either chosen from the previous state of the texture or chosen from that of source texture which may seems strange from the semantics of texImage2D(...).
My first patch here is meant to respect all the limitations but make the code and comments more simpler and cleaner. A similar IsCopyTextureFormatSupportedCHROMIUM(source_format, source_type, dest_level, dest_format, dest_type) may be added in webkit and chromium. All the combination checking will be tested by gl_copy_texture_CHROMIUM_unittest.cc first. The first and second limitation above can be solved easily by parameters checking and the third one can be solved by choosing the type from the passed dest_type parameter. 
The second potential patch may add some complements. For example, when no flipY operation, no preMultiplyAlpha or unMultiplyAlpha operation is needed but level is not 0, we can consider to use glCopyTexImage2D().
I'd like to work on the first patch first since the code at present is a little loose.

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