Surface class

Manages the swapchain color textures a Scene composites onto the Flutter canvas, plus the pool of transient render-graph attachments.

Each Scene owns one Surface. Every frame the renderer asks the surface for the next swapchain color texture via getNextSwapchainColorTexture; the surface rotates through a small ring of textures so the GPU isn't asked to overwrite one the compositor is still reading. The tone-mapping pass renders the final image into this texture, which is then drawn to the canvas via Texture.asImage. The ring (and the transient texture pool) are dropped and rebuilt whenever the requested size changes.

Applications typically don't interact with Surface directly; it is driven internally by Scene.render.

Constructors

Surface()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transientTexturePool → TransientTexturePool
Pool of transient textures used as intermediate render targets by the render graph (the HDR scene color, MSAA color, depth, shadow maps, post-process buffers, ...). Empty until a pass acquires one.
final

Methods

getNextSwapchainColorTexture(Size size) Texture
Returns the next 8-bit color texture in the rotating swapchain ring, allocating one when the ring isn't yet full. The ring (and the transient texture pool) are dropped and rebuilt whenever size changes from the previous call.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited