DefaultShaderWarmUp class

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.

Inheritance

Constructors

DefaultShaderWarmUp({double drawCallSpacing: 0.0, Size canvasSize: const ui.Size(100.0, 100.0) })
Allow DefaultShaderWarmUp to be used as the default value of parameters.
const

Properties

canvasSize Size
Value that returned by this.size to control canvas size where draws happen.
final
drawCallSpacing double
Constant that can be used to space out draw calls for visualizing the draws for debugging purposes (example: 80.0). Be sure to also change your canvas size.
final
size Size
The size of the warm up image. [...]
read-only, override
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

Methods

warmUpOnCanvas(Canvas canvas) Future<void>
Trigger common draw operations on a canvas to warm up GPU shader compilation cache.
override
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
Returns a string representation of this object.
inherited

Operators

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