Skip to content
Commit 87f3b075 authored by Alexander Volkov's avatar Alexander Volkov
Browse files

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
parent 919dc0e0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment