"""
qreal u = targetRect.width() / textureSize.width() * dpr;
"""
Would be better expressed as:
"""
qreal u = (targetRect.width() * dpr) / textureSize.width();
"""
To make it obvious that your're converting targetRect.width() from DIP (or layout pixels) to actual/physical pixels, which is the unit of textureSize.width().
Still in MirSurfaceItem: :updatePaintNod e:
"""
qreal u = targetRect.width() / textureSize.width() * dpr;
"""
Would be better expressed as:
""" width() ;
qreal u = (targetRect.width() * dpr) / textureSize.
"""
To make it obvious that your're converting targetRect.width() from DIP (or layout pixels) to actual/physical pixels, which is the unit of textureSize. width() .
Likewise for the v coordinate.