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
Please register or sign in to comment