[Webkit-unassigned] [Bug 107526] Optimize some operations for float type in texture format conversions of WebGL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 22 10:14:10 PST 2013


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #183934|review?, commit-queue?      |review+, commit-queue-
               Flag|                            |




--- Comment #2 from Darin Adler <darin at apple.com>  2013-01-22 10:16:03 PST ---
(From update of attachment 183934)
View in context: https://bugs.webkit.org/attachment.cgi?id=183934&action=review

Optimizations look fine. I’m a little concerned that we truncate rather than rounding after multiplying by scale factors. I’m not sure that’s the correct calculation. I also wonder if there’s an even faster branch-free way to compute those scale factors?

Someone should fix the style mistake all over this file, calling the type "unsigned int" when the WebKit coding style suggests calling it just "unsigned".

> Source/WebCore/platform/graphics/GraphicsContext3D.cpp:1177
> +    ASSERT(source && destination);

Two thoughts:

1) We never do ASSERT with && in it. We always prefer two separate assertions in such cases so we can more easily figure out which one has failed.
2) It seems unnecessary to assert these pointers are non-zero here. Such pointers could be scattered all over the code; there’s no particular reason to expect null pointers here or to assume it would be hard to diagnose a null pointer related crash inside memcpy.

Based on that, I suggest removing this line of code.

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