Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 341129414655facbed5a7a46f322b16a93028ac9
      
https://github.com/WebKit/WebKit/commit/341129414655facbed5a7a46f322b16a93028ac9
  Author: Loïc Yhuel <loic.yh...@softathome.com>
  Date:   2024-05-23 (Thu, 23 May 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/nicosia/NicosiaGCGLANGLELayer.cpp
    M 
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp
    M 
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h
    M Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp

  Log Message:
  -----------
  [GTK][WPE] Do not display uninitialized WebGL front buffer
https://bugs.webkit.org/show_bug.cgi?id=274527

Reviewed by Miguel Gomez.

When a page creates a WebGL context, but does not render immediately, we 
display the compositor
texture from GraphicsContextGLTextureMapperANGLE.
After reshapeDrawingBuffer (glTexImage2D with null data), the contents are 
undefined as per the
OpenGL specification, and depending on the plaform this may display 
uninitialized memory.

We now check if the texture is initialized before using it in 
GCGLANGLELayer::swapBuffersIfNeeded
or TextureMapperGCGLPlatformLayer::paintToTextureMapper.

* Source/WebCore/platform/graphics/nicosia/NicosiaGCGLANGLELayer.cpp:
(Nicosia::GCGLANGLELayer::swapBuffersIfNeeded):
* 
Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLTextureMapperANGLE::swapCompositorTexture):
(WebCore::GraphicsContextGLTextureMapperANGLE::reshapeDrawingBuffer):
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h:
* Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:
(WebCore::TextureMapperGCGLPlatformLayer::paintToTextureMapper):

Canonical link: https://commits.webkit.org/279206@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to