pixelRatio property
What a frame is laid out at — physical pixels per logical one.
A canvas is an image, but a composition is a design, and a design has to be written in the units a designer thinks in. Rendering 1320×2868 at ratio 1 would put a 16-point caption in a space 2868 units tall, where it is a speck.
The rule is that a canvas is laid out in the same logical units the app inside it was, which is the device's own ratio. So a frame's padding and the phone's own margins are the same kind of number, and a composition designed against one device does not silently change scale on another.
Implementation
final double pixelRatio;