daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Sep 11th, 2012 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- qtwebkit-5.0b3.orig/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
  2. +++ qtwebkit-5.0b3/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
  3. @@ -624,15 +624,15 @@ static void swizzleBGRAToRGBA(uint32_t*
  4.      }
  5.  }
  6.  
  7. -static bool driverSupportsBGRASwizzling()
  8. -{
  9. -#if defined(TEXMAP_OPENGL_ES_2)
  10. +//static bool driverSupportsBGRASwizzling()
  11. +//{
  12. +//#if defined(TEXMAP_OPENGL_ES_2)
  13.      // FIXME: Implement reliable detection. See also https://bugs.webkit.org/show_bug.cgi?id=81103.
  14. -    return false;
  15. -#else
  16. -    return true;
  17. -#endif
  18. -}
  19. +//    return false;
  20. +//#else
  21. +//    return true;
  22. +//#endif
  23. +//}
  24.  
  25.  static bool driverSupportsSubImage()
  26.  {
  27. @@ -653,7 +653,9 @@ void BitmapTextureGL::didReset()
  28.      if (m_textureSize == contentSize())
  29.          return;
  30.  
  31. -    GLuint format = driverSupportsBGRASwizzling() ? GL_BGRA : GL_RGBA;
  32. +    //BGRA not supported by GLES2
  33. +    //GLuint format = driverSupportsBGRASwizzling() ? GL_BGRA : GL_RGBA;
  34. +    GLuint format = GL_RGBA;
  35.  
  36.      m_textureSize = contentSize();
  37.      GL_CMD(glBindTexture(GL_TEXTURE_2D, m_id));
  38. @@ -671,10 +673,10 @@ void BitmapTextureGL::updateContents(con
  39.      GL_CMD(glBindTexture(GL_TEXTURE_2D, m_id));
  40.  
  41.      const unsigned bytesPerPixel = 4;
  42. -    if (driverSupportsBGRASwizzling())
  43. -        glFormat = GL_BGRA;
  44. -    else
  45. -        swizzleBGRAToRGBA(reinterpret_cast<uint32_t*>(const_cast<void*>(data)), IntRect(sourceOffset, targetRect.size()), bytesPerLine / bytesPerPixel);
  46. +    //if (driverSupportsBGRASwizzling())
  47. +    //    glFormat = GL_BGRA;
  48. +    //else
  49. +    swizzleBGRAToRGBA(reinterpret_cast<uint32_t*>(const_cast<void*>(data)), IntRect(sourceOffset, targetRect.size()), bytesPerLine / 4);
  50.  
  51.      if (bytesPerLine == targetRect.width() / 4 && sourceOffset == IntPoint::zero()) {
  52.          GL_CMD(glTexSubImage2D(GL_TEXTURE_2D, 0, targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(), glFormat, DEFAULT_TEXTURE_PIXEL_TRANSFER_TYPE, (const char*)data));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top