Title: [253691] trunk/Source/WebCore
- Revision
- 253691
- Author
- [email protected]
- Date
- 2019-12-18 09:38:18 -0800 (Wed, 18 Dec 2019)
Log Message
[GTK] WebGL backed by ANGLE flickers when USE_OPENGL_ES is enabled.
https://bugs.webkit.org/show_bug.cgi?id=202508
Reviewed by Žan Doberšek.
The color format and internal one of BitmapTextureGL cannot be matched
where USE_ANGLE_WEBGL and USE_OPENGL_ES are enabled simultaneously.
This causes the flickering issue on WebGL scene since it prevents TextureMapper
from recycling available layer buffers due to mismatched color format.
When ANGLE_WEBGL is enabled, the internal color format is set GL_RGBA8.
However, that is not compatible to GLES textures. To address this,
We always make the color format of BitmapTextureGL GL_RGBA,
and only set its internal color format with a given value.
No new tests since no functionality changed.
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
(Nicosia::GC3DLayer::swapBuffersIfNeeded):
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::BitmapTextureGL):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253690 => 253691)
--- trunk/Source/WebCore/ChangeLog 2019-12-18 17:22:37 UTC (rev 253690)
+++ trunk/Source/WebCore/ChangeLog 2019-12-18 17:38:18 UTC (rev 253691)
@@ -1,3 +1,26 @@
+2019-12-18 ChangSeok Oh <[email protected]>
+
+ [GTK] WebGL backed by ANGLE flickers when USE_OPENGL_ES is enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=202508
+
+ Reviewed by Žan Doberšek.
+
+ The color format and internal one of BitmapTextureGL cannot be matched
+ where USE_ANGLE_WEBGL and USE_OPENGL_ES are enabled simultaneously.
+ This causes the flickering issue on WebGL scene since it prevents TextureMapper
+ from recycling available layer buffers due to mismatched color format.
+ When ANGLE_WEBGL is enabled, the internal color format is set GL_RGBA8.
+ However, that is not compatible to GLES textures. To address this,
+ We always make the color format of BitmapTextureGL GL_RGBA,
+ and only set its internal color format with a given value.
+
+ No new tests since no functionality changed.
+
+ * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
+ (Nicosia::GC3DLayer::swapBuffersIfNeeded):
+ * platform/graphics/texmap/BitmapTextureGL.cpp:
+ (WebCore::BitmapTextureGL::BitmapTextureGL):
+
2019-12-18 Antti Koivisto <[email protected]>
Style::Invalidator should be able to invalidate using multiple RuleSets in one pass
Modified: trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp (253690 => 253691)
--- trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp 2019-12-18 17:22:37 UTC (rev 253690)
+++ trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp 2019-12-18 17:38:18 UTC (rev 253691)
@@ -112,7 +112,7 @@
std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer;
layerBuffer = proxy.getAvailableBuffer(textureSize, m_context.m_internalColorFormat);
if (!layerBuffer) {
- auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get(), m_context.m_internalColorFormat);
+ auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get(), flags, m_context.m_internalColorFormat);
static_cast<BitmapTextureGL&>(texture.get()).setPendingContents(WTFMove(image));
layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(WTFMove(texture), flags);
} else
Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp (253690 => 253691)
--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp 2019-12-18 17:22:37 UTC (rev 253690)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp 2019-12-18 17:38:18 UTC (rev 253691)
@@ -63,13 +63,14 @@
BitmapTextureGL::BitmapTextureGL(const TextureMapperContextAttributes& contextAttributes, const Flags, GLint internalFormat)
: m_contextAttributes(contextAttributes)
+ , m_format(GL_RGBA)
{
if (internalFormat != GL_DONT_CARE) {
- m_internalFormat = m_format = internalFormat;
+ m_internalFormat = internalFormat;
return;
}
- m_internalFormat = m_format = GL_RGBA;
+ m_internalFormat = GL_RGBA;
}
void BitmapTextureGL::didReset()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes