API

Function setSurfaceSize

  • Set this surface's swapchain backing-store size directly, in device pixels. Use this when the surface renders into an OffscreenCanvas whose layout size is only known on another thread (the host posts the CSS size × devicePixelRatio). When the size changes, asks every rendering context registered on this surface to rebuild its canvas-sized GPU resources via the optional _resize hook.

    Parameters

    Returns void