Speed up texImage from BGRA
Created attachment 105056 [details] Patch
Comment on attachment 105056 [details] Patch Attachment 105056 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9488247
Created attachment 105059 [details] Patch
Comment on attachment 105059 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105059&action=review Wheee! What kind of speed gains does this get (not fps, but for the actual pack fn)? > Source/WebCore/platform/graphics/GraphicsContext3D.cpp:1152 > + if (reinterpret_cast<void*>(rowPackingFunc) == reinterpret_cast<void*>(packOneRowOfRGBA8ToRGBA8)) { As a bystander to this code, it took me a while to figure out what this check was really doing --- might want to preceed this with a comment saying "skip unpacking step if does nothing and unpack directly to the destination"?
(In reply to comment #4) > (From update of attachment 105059 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=105059&action=review > > Wheee! What kind of speed gains does this get (not fps, but for the actual pack fn)? I'm not sure, as the benchmark I was using increased the amount of work that it had this do when I made it faster, but it maybe takes 1/2 to 1/3 of its old time. I know the benchmark scored about 1.5x what it was without the patch. > > > Source/WebCore/platform/graphics/GraphicsContext3D.cpp:1152 > > + if (reinterpret_cast<void*>(rowPackingFunc) == reinterpret_cast<void*>(packOneRowOfRGBA8ToRGBA8)) { > > As a bystander to this code, it took me a while to figure out what this check was really doing --- might want to preceed this with a comment saying "skip unpacking step if does nothing and unpack directly to the destination"? Good idea.
Created attachment 105201 [details] Patch
Comment on attachment 105201 [details] Patch Attachment 105201 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9495512 New failing tests: fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view.html
Created attachment 105207 [details] Patch
Comment on attachment 105207 [details] Patch Looks good to me. Did you run the texture-related WebGL conformance tests and layout tests to ensure no accidental regressions?
Yeah, they all seem to work.
Comment on attachment 105207 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105207&action=review > Source/WebCore/platform/graphics/GraphicsContext3D.cpp:481 > + uint32_t rgba = (((bgra >> 16) | (bgra << 16)) & 0x00ff00ff) | (bgra & 0xff00ff00); Sorry, I just realized that this won't work correctly on big-endian hardware. You can use #if CPU(BIG_ENDIAN) to gate the code (see html/canvas/DataView.cpp); could you please add another arm?
Created attachment 105510 [details] fix big endian
Comment on attachment 105510 [details] fix big endian Great, thanks. r=me
Comment on attachment 105510 [details] fix big endian Clearing flags on attachment: 105510 Committed r94026: <http://trac.webkit.org/changeset/94026>
All reviewed patches have been landed. Closing bug.