On macOS, most plugins assume getSize, onSize, checkSizeConstraint etc. operate in logical pixels, which differs from the behaviour on Windows and Linux, which instead operate in physical pixels.
The docs for IPlugViewContentScaleSupport indicate that a scale factor may be applied for reasons other than high-dpi compensation, which implies that a host may choose to use this interface on macOS. It would help to avoid ambiguity if the docs could explicitly mention that future calls to onSize
should still be in logical pixels rather than physical pixels after calling setContentScaleFactor
.
I’m making this suggestion because I recently discovered that Phase Plant VST3 on macOS will display at the expected scale when setContentScaleFactor
is never called; but when setContentScaleFactor (1.0f)
is called while the plugin’s view is on a retina display, the plugin draws at 50% scale. I believe this is a bug in Phase Plant (at least, it’s inconsistent with how scaling works for other plugins on macOS), but I can’t find any conclusive guidance in the VST3 docs.
Ideally, it would be helpful if the docs for getSize
, onSize
, and checkSizeConstraint
could specify that they always operate in logical pixels on macOS, even after a custom scale factor is applied. Then, I’d be able to log a compelling bug report for Phase Plant.