Code review comment for lp:~unity-team/qtmir/dpr

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Still in MirSurfaceItem::updatePaintNode:

"""
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().

Likewise for the v coordinate.

« Back to merge proposal