Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 673b8d7495afe2f47b283219edb4f5ac05393202
      
https://github.com/WebKit/WebKit/commit/673b8d7495afe2f47b283219edb4f5ac05393202
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2026-02-27 (Fri, 27 Feb 2026)

  Changed paths:
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

  Log Message:
  -----------
  REGRESSION(307450@main): webgl/1.0.x/conformance/context/context-lost.html 
crashes
https://bugs.webkit.org/show_bug.cgi?id=308815
rdar://171345790

Reviewed by Cameron McCormack.

After context loss, canvas resizes would not affect default framebuffer
size. This would cause the HTMLCanvasElement / OffscreenCanvas
image to remain the old size.
The test would call texImage2D with the lost canvas. This would
ASSERT that the element size would be same as the image size.
The element size would follow the resized size, where as the image
size would be the old size.

Fix by ensure the saved images of the context are discarded on resize, even
if the context is lost.

Tests:
webgl/1.0.x/conformance/context/context-lost.html

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::surfaceBufferToImageBuffer):
(WebCore::WebGLRenderingContextBase::didUpdateCanvasSizeProperties):
(WebCore::WebGLRenderingContextBase::updateMemoryCost const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to