DefaultShaderWarmUp class Null safety

Default way of warming up Skia shader compilations.

The draw operations being warmed up here are decided according to Flutter engineers' observation and experience based on the apps and the performance issues seen so far.

This is used for the default value of PaintingBinding.shaderWarmUp. Consider setting that static property to a different value before the binding is initialized to change the warm-up sequence.

See also:

Inheritance

Constructors

DefaultShaderWarmUp({double drawCallSpacing, Size canvasSize})
Create an instance of the default shader warm-up logic. [...]
const

Properties

canvasSize Size
The size of the canvas required to paint the shapes in warmUpOnCanvas. [...]
final
drawCallSpacing double
Distance to place between draw calls for visualizing the draws for debugging purposes (e.g. 80.0). [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size Size
The size of the warm up image. [...]
read-only, override

Methods

execute() Future<void>
Construct an offscreen image of size, and execute warmUpOnCanvas on a canvas associated with that image. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited
warmUpOnCanvas(Canvas canvas) Future<void>
Trigger common draw operations on a canvas to warm up GPU shader compilation cache.
override

Operators

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