The current texture-mapper interface only allows for creating a BGRA32 buffer and painting into it. But in WebKit2, we already have the pixels and want to update them directly into the texture without the extra copy.
Created attachment 108680 [details] Patch
Created attachment 108798 [details] Patch
Comment on attachment 108798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108798&action=review > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:543 > +static void* swizzleBGRAToRGBA(void* data, const IntSize& size) This function should take something more specific than a void*. Also, it has a return type but no return statements. > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:548 > + uint* p = static_cast<uint*>(data) + y * (width * 4); Is the number of bytes per row always guaranteed to be (width * 4)? > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:559 > + void* swizzledBits = bits; This appears to be unused. > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:586 > + break; Wrong indentation.
Created attachment 108824 [details] Patch
> > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:586 > > + break; > > Wrong indentation. Hmm... I fail to see the error of my ways here. I believe the indentation is correct.
(In reply to comment #5) > > > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:586 > > > + break; > > > > Wrong indentation. > Hmm... I fail to see the error of my ways here. > I believe the indentation is correct. It should line up with "glFormat = GL_BGR;" which it doesn't :)
Comment on attachment 108824 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=108824&action=review r=me > Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:585 > + glFormat = GL_BGR; > +#endif > + break; Indentation police! Wiiiooowiiioooo!
Comment on attachment 108824 [details] Patch Clearing flags on attachment: 108824 Committed r96118: <http://trac.webkit.org/changeset/96118>
All reviewed patches have been landed. Closing bug.