Files
ladybird/Libraries/LibWeb/HTML/Canvas/CanvasDrawImage.cpp
mikiubo 88ac590e9d LibWeb: Present canvas before snapshotting in drawImage()
When a WebGL canvas is used as a CanvasImageSource, the underlying
PaintingSurface may not yet reflect the most recent GL commands.
This caused drawImage() to capture stale or empty content unless
gl.flush() was called manually from JS.

Call HTMLCanvasElement::present() before creating the snapshot so
that WebGL content is properly synchronized with the surface prior
to readback.

Fix #7901
2026-02-12 00:28:36 +01:00

5.5 KiB