Diffusion KRDC 87f3b0754638

vnc: Optimize and simplify repainting

Authored by volkov on Jun 10 2019, 10:35 AM.

Description

vnc: Optimize and simplify repainting

Summary:
Use qreal version of QPainter::drawImage() with the
QPainter::SmoothPixmapTransform flag instead of
QImage::copy() -> QImage::scaled() -> QPainter::drawImage()
chain. This is much faster and allows to avoid artifacts
caused by rounding and the Qt::IgnoreAspectRatio flag.
The only drawback of the new approach is that the result
is worse when the image is downscaled by a factor greater
than 2 (QTBUG-42330), but this is not critical.

Also don't process separately repaints caused by a server.
The only reason for this was to avoid extra rounding of
coordinates, but with this change rounding is not needed
at all.

Reviewers: KDE Applications, aacid

Reviewed By: KDE Applications, aacid

Subscribers: aacid

Differential Revision: https://phabricator.kde.org/D21096

Details

Committed
volkovJun 10 2019, 10:42 AM
Reviewer
KDE Applications
Differential Revision
D21096: vnc: Optimize and simplify repainting
Parents
R436:919dc0e09b87: Merge remote-tracking branch 'origin/Applications/19.04'
Branches
Unknown
Tags
Unknown