Decode at the size the frame will actually occupy inside a box the consumer
describes: native aspect fitted into boxWidth x boxHeight, times the clamped
device pixel ratio. Letterboxing is why the box is two numbers and not one,
since a portrait source in a landscape box paints far narrower than the box.
This is the strategy for presentation "frames". There the consumer owns the
compositor, so it is the only side that knows the box, and viewportResolution
has nothing to read.
Decode at the size the frame will actually occupy inside a box the consumer describes: native aspect fitted into boxWidth x boxHeight, times the clamped device pixel ratio. Letterboxing is why the box is two numbers and not one, since a portrait source in a landscape box paints far narrower than the box.
This is the strategy for presentation "frames". There the consumer owns the compositor, so it is the only side that knows the box, and viewportResolution has nothing to read.