MinecraftCanvasTextureLease

Borrows one ordinary 2D RGBA8 straight-alpha color texture until GPU capture completion.

Implementations keep the texture and its contents stable until render-thread close after the capture fence. Texture ownership stays external; Strata never closes it or changes its contents or sampling parameters. Texture binding usage is sufficient: COPY_SRC is not required because Canvas samples into an owned offscreen target. Layered, depth, HDR, multisample, and integer inputs are rejected before sampling.

Properties

Link copied to clipboard

The logical image edge represented by native texel row zero, fixed throughout this lease.

Link copied to clipboard
abstract val size: IntSize

The immutable positive extent of source mip level zero, read on the render thread.

Link copied to clipboard
abstract val snapshot: DrawImage?

Optional immutable pixels from exactly this lease, with size and source rows ordered according to origin.

Link copied to clipboard
abstract val texture: GpuTexture

The externally owned texture from the current Minecraft GPU device, borrowed on the render thread.

Functions

Link copied to clipboard
abstract override fun close()

Releases the source reservation on the render thread after GPU capture completes, independently of later GUI target use.