Modified: trunk/Source/WebCore/ChangeLog (248361 => 248362)
--- trunk/Source/WebCore/ChangeLog 2019-08-07 06:53:10 UTC (rev 248361)
+++ trunk/Source/WebCore/ChangeLog 2019-08-07 10:44:17 UTC (rev 248362)
@@ -1,3 +1,17 @@
+2019-08-07 Chris Lord <[email protected]>
+
+ context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=200434
+
+ 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.
+
2019-08-06 Saam Barati <[email protected]>
[WHLSL] Make resolveFunction in Checker faster
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp (248361 => 248362)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp 2019-08-07 06:53:10 UTC (rev 248361)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp 2019-08-07 10:44:17 UTC (rev 248362)
@@ -79,15 +79,13 @@
{
const int width = size.width();
const int height = size.height();
- GLuint colorFormat = 0, pixelDataType = 0;
+ GLuint colorFormat = 0;
if (m_attrs.alpha) {
m_internalColorFormat = GL_RGBA;
colorFormat = GL_RGBA;
- pixelDataType = GL_UNSIGNED_BYTE;
} else {
m_internalColorFormat = GL_RGB;
colorFormat = GL_RGB;
- pixelDataType = GL_UNSIGNED_SHORT_5_6_5;
}
// We don't allow the logic where stencil is required and depth is not.
@@ -103,7 +101,7 @@
ASSERT(m_texture);
::glBindTexture(GL_TEXTURE_2D, m_texture);
- ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, pixelDataType, 0);
+ ::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0);
::glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0);
#if USE(COORDINATED_GRAPHICS)