renderScale property
Multiplier applied to the logical widget size when sizing the native rasterization buffer. The thorvg SwCanvas runs on the CPU, so cost scales with rendered pixel count.
1.0(default) — render at logical pixels. Cheapest; output will look slightly soft on high-DPR (retina) screens because Flutter then upscales the texture to the physical buffer.- device DPR (e.g. 2.5–3.0) — crispest, but rasterization cost is
~
renderScale²higher. With many simultaneous animations this can exceed the shared render thread's frame budget.
The default was lowered from 1 + (dpr - 1) * 0.75 after profiling
8 portrait slot animations on a high-DPR emulator: at the previous
formula the render thread could not produce frames fast enough,
causing visible stutter even though the UI thread was idle.
Implementation
final double renderScale;