Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- qtwebkit-5.0b3.orig/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
- +++ qtwebkit-5.0b3/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
- @@ -624,15 +624,15 @@ static void swizzleBGRAToRGBA(uint32_t*
- }
- }
- -static bool driverSupportsBGRASwizzling()
- -{
- -#if defined(TEXMAP_OPENGL_ES_2)
- +//static bool driverSupportsBGRASwizzling()
- +//{
- +//#if defined(TEXMAP_OPENGL_ES_2)
- // FIXME: Implement reliable detection. See also https://bugs.webkit.org/show_bug.cgi?id=81103.
- - return false;
- -#else
- - return true;
- -#endif
- -}
- +// return false;
- +//#else
- +// return true;
- +//#endif
- +//}
- static bool driverSupportsSubImage()
- {
- @@ -653,7 +653,9 @@ void BitmapTextureGL::didReset()
- if (m_textureSize == contentSize())
- return;
- - GLuint format = driverSupportsBGRASwizzling() ? GL_BGRA : GL_RGBA;
- + //BGRA not supported by GLES2
- + //GLuint format = driverSupportsBGRASwizzling() ? GL_BGRA : GL_RGBA;
- + GLuint format = GL_RGBA;
- m_textureSize = contentSize();
- GL_CMD(glBindTexture(GL_TEXTURE_2D, m_id));
- @@ -671,10 +673,10 @@ void BitmapTextureGL::updateContents(con
- GL_CMD(glBindTexture(GL_TEXTURE_2D, m_id));
- const unsigned bytesPerPixel = 4;
- - if (driverSupportsBGRASwizzling())
- - glFormat = GL_BGRA;
- - else
- - swizzleBGRAToRGBA(reinterpret_cast<uint32_t*>(const_cast<void*>(data)), IntRect(sourceOffset, targetRect.size()), bytesPerLine / bytesPerPixel);
- + //if (driverSupportsBGRASwizzling())
- + // glFormat = GL_BGRA;
- + //else
- + swizzleBGRAToRGBA(reinterpret_cast<uint32_t*>(const_cast<void*>(data)), IntRect(sourceOffset, targetRect.size()), bytesPerLine / 4);
- if (bytesPerLine == targetRect.width() / 4 && sourceOffset == IntPoint::zero()) {
- GL_CMD(glTexSubImage2D(GL_TEXTURE_2D, 0, targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), glFormat, DEFAULT_TEXTURE_PIXEL_TRANSFER_TYPE, (const char*)data));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement