WebGpuFrameArena class final
A bump allocator over one GPUBuffer, reset every frame. See the library
comment, which is where the argument for this shape is.
Constructors
Properties
- alignment → int
-
What every allocation's offset is rounded up to.
final
- bufferCount → int
-
How many
GPUBuffers this arena is holding, forWebGpuDevice.debugTrackedResourceCount. One, until a frame overflows it, and zero once dispose has destroyed them.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
What the browser calls this buffer when it complains about it.
final
- peakBytes → int
-
The high-water mark since the arena was made, in bytes: what the largest
frame so far asked of it. Diagnostic — read by
dispose_test.dart, which asserts that a frame's second run allocates nothing new.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → int
-
What the buffer may be bound as — uniform, vertex or index — beside
COPY_DST, which every arena needs and this adds.final
Methods
-
dispose(
) → void -
Destroys every buffer this arena holds. Called from
dispose, once. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Back to the start, at the top of a frame. Safe under a frame the GPU has not finished — the library comment is the argument.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
ByteData bytes) → WebGpuSlice -
byteswritten into the arena, and where they went.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited