Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 32a30109b27ab81b890b23b69e0a05686896e2a7
https://github.com/WebKit/WebKit/commit/32a30109b27ab81b890b23b69e0a05686896e2a7
Author: Roberto Rodriguez <[email protected]>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/SurfaceMtl.mm
Log Message:
-----------
[ANGLE] Metal: Acquire drawable during framebuffer sync after swap
https://bugs.webkit.org/show_bug.cgi?id=312962
rdar://175156622
Reviewed by Dan Glastonbury.
After calling eglSwapBuffers(), the Metal backend releases the drawable but
does not mark
the framebuffer dirty. On next frame, FramebufferMtl::clearImpl() reads stale
dimensions and
computes clearOpts before the new drawable is acquired. When clearWithDraw()
triggers the
acquisition and detects a resize, the stale clearOpts produces a Y-flipped
scissor rect
that exceeds the new render pass height, which gets rejected by Metal when
commands are
flushed during glReadPixels().
Fix by re-fetching render target in FramebufferMtl::syncState() when the color
buffer
contents are marked dirty, which acquires the new drawable and updates the
surface
dimensions during sync before clearImpl() reads them.
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm:
(rx::FramebufferMtl::syncState):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/SurfaceMtl.mm:
(rx::WindowSurfaceMtl::swap):
Canonical link: https://commits.webkit.org/311874@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications