[Texmap][Qt] Enable TextureMapperGL in platforms where BGRA is not present
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 10:51:59 +0000 (10:51 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 10:51:59 +0000 (10:51 +0000)
commit27af00932ea52c006a1c2419e3001cff990594fa
treeaa55c1f7288f74fbd3ed59d7f003d9f7fa48485b
parentb5e2b81d4fd65b36c4c89ce32ac3b0134fd9ea78
[Texmap][Qt] Enable TextureMapperGL in platforms where BGRA is not present
https://bugs.webkit.org/show_bug.cgi?id=65473

Reviewed by Andreas Kling.

For now, swap RGBA->BGRA in software if we're in OpenGL ES 2.
We do that by iterating on the pixels and manually swapping each pixel's red and blue
values. This can be done faster with shaders, but for now this is a working solution
for platforms without BGRA support.

No new tests. Existing layout tests cover this.

* platform/graphics/opengl/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::endPaint):
* platform/graphics/opengl/TextureMapperGL.h:
* platform/graphics/qt/TextureMapperQt.cpp:
(WebCore::RGBA32PremultimpliedBufferQt::swapRGB):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp
Source/WebCore/platform/graphics/opengl/TextureMapperGL.h
Source/WebCore/platform/graphics/qt/TextureMapperQt.cpp