Documentation
    Preparing search index...

    Class GpuReadbackSource

    Asynchronously refreshed pixels with a synchronous, stable RasterSource view.

    Implements

    Index
    colorSpace: ColorSpace

    The colour space of the texels this source produces. Default "srgb" — a deliberate difference from TextureSource's "linear" default, with the reason written at both (RFC 0004 Q3, adopted): R-15's linear default exists only so that already-authored textures and their pixel goldens do not move, a class that did not exist then has neither, and a host 2D canvas produces sRGB-encoded bytes unambiguously. Choosing "linear" here for consistency would make the new tier wrong on purpose.

    height: number

    Height in texels. A finite integer ≥ 1. Constant until the application calls CanvasTexture.resize after changing it.

    isGpuReadbackSource: true = ...
    origin: "bottom-left" = ...

    Which row RasterSource.readPixels writes first — see RasterOrigin. Default "bottom-left". Read once, at CanvasTexture construction, like the size.

    target: RenderTarget
    width: number

    Width in texels. A finite integer ≥ 1. Constant until the application calls CanvasTexture.resize after changing it.

    • get byteLength(): number

      Retained CPU bytes, excluding the target and any wrapping CanvasTexture.

      Returns number