createImageSurface method
- int width,
- int height, {
- PixelFormat? format,
Creates an image surface for rendering content that Flutter draws as a ui.Image.
A GpuImageSurface owns the final color textures that are converted into ui.Image handles and drawn by Flutter. Use it for animated or frequently updated render targets where the app should not have to guess how many textures are needed to avoid overwriting a frame Flutter may still be sampling.
The surface manages only the final presentable color texture. Renderers should continue to create ordinary Texture objects for depth, stencil, multisample, and intermediate color attachments.
Implementation
GpuImageSurface createImageSurface(
int width,
int height, {
PixelFormat? format,
}) {
return GpuImageSurface._(this, width, height, format ?? defaultColorFormat);
}