Changeset 248362 in webkit


Ignore:
Timestamp:
Aug 7, 2019 3:44:17 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit
https://bugs.webkit.org/show_bug.cgi?id=200434

Patch by Chris Lord <Chris Lord> on 2019-08-07
Reviewed by Žan Doberšek.

This patch fixes 16-bit surfaces being used for FBOs with no
alpha component when using the GLES implementation of GraphicsContext3D.

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):
Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_SHORT_5_6_5 for surfaces with no alpha.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248339 r248362  
     12019-08-07  Chris Lord  <clord@igalia.com>
     2
     3        context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit
     4        https://bugs.webkit.org/show_bug.cgi?id=200434
     5
     6        Reviewed by Žan Doberšek.
     7
     8        This patch fixes 16-bit surfaces being used for FBOs with no
     9        alpha component when using the GLES implementation of GraphicsContext3D.
     10
     11        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
     12        (WebCore::GraphicsContext3D::reshapeFBOs):
     13        Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_SHORT_5_6_5 for surfaces with no alpha.
     14
    1152019-08-06  Saam Barati  <sbarati@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp

    r247841 r248362  
    8080    const int width = size.width();
    8181    const int height = size.height();
    82     GLuint colorFormat = 0, pixelDataType = 0;
     82    GLuint colorFormat = 0;
    8383    if (m_attrs.alpha) {
    8484        m_internalColorFormat = GL_RGBA;
    8585        colorFormat = GL_RGBA;
    86         pixelDataType = GL_UNSIGNED_BYTE;
    8786    } else {
    8887        m_internalColorFormat = GL_RGB;
    8988        colorFormat = GL_RGB;
    90         pixelDataType = GL_UNSIGNED_SHORT_5_6_5;
    9189    }
    9290
     
    104102    ASSERT(m_texture);
    105103    ::glBindTexture(GL_TEXTURE_2D, m_texture);
    106     ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, pixelDataType, 0);
     104    ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0);
    107105    ::glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0);
    108106
Note: See TracChangeset for help on using the changeset viewer.