Resize this surface's swapchain backing store to match the canvas client size. When
the size changes, asks every rendering context registered on this surface to rebuild
its canvas-sized GPU resources via the optional _resize hook. If the canvas has
not been laid out yet, preserves its explicit backing-store size.
Only DOM canvases are auto-sized from layout here. An OffscreenCanvas has no
layout box, so its size must be pushed in externally via setSurfaceSize
(e.g. from the host thread that owns the visible canvas) and this call is a no-op
for it.
Resize this surface's swapchain backing store to match the canvas client size. When the size changes, asks every rendering context registered on this surface to rebuild its canvas-sized GPU resources via the optional
_resizehook. If the canvas has not been laid out yet, preserves its explicit backing-store size.Only DOM canvases are auto-sized from layout here. An
OffscreenCanvashas no layout box, so its size must be pushed in externally via setSurfaceSize (e.g. from the host thread that owns the visible canvas) and this call is a no-op for it.